[rpm] use one single config file for harmony node

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3309/head
Leo Chen 4 years ago
parent 44ed29f000
commit d85c37de08
  1. 5
      Makefile
  2. 3
      scripts/rpm/harmony.service
  3. 6
      scripts/rpm/harmony.spec

@ -88,15 +88,16 @@ deb: rpm
fpm -s dir -t deb -n $(PKGNAME) -v $(VERSION)-$(COMMIT) --prefix /usr/local bin/harmony
fpm -s pleaserun -t deb -n $(PKGNAME)-service -v $(VERSION) /usr/local/bin/harmony
rpm_init:
rpm_init: bin/harmony
rm -rf $(RPMBUILD)
mkdir -p $(RPMBUILD)/{SOURCES,SPECS,BUILD,RPMS,BUILDROOT,SRPMS}
mkdir -p $(RPMBUILD)/SOURCES/$(PKGNAME)-$(VERSION)
cp -f bin/harmony $(RPMBUILD)/SOURCES/$(PKGNAME)-$(VERSION)
bin/harmony dumpconfig $(RPMBUILD)/SOURCES/$(PKGNAME)-$(VERSION)/harmony.cfg
cp -f scripts/rpm/harmony.service $(RPMBUILD)/SOURCES/$(PKGNAME)-$(VERSION)
cp -f scripts/rpm/harmony-setup.sh $(RPMBUILD)/SOURCES/$(PKGNAME)-$(VERSION)
cp -f scripts/rpm/harmony-sysctl.conf $(RPMBUILD)/SOURCES/$(PKGNAME)-$(VERSION)
cp -f scripts/rpm/harmony-*.cfg $(RPMBUILD)/SOURCES/$(PKGNAME)-$(VERSION)
# cp -f scripts/rpm/harmony-*.cfg $(RPMBUILD)/SOURCES/$(PKGNAME)-$(VERSION)
cp -f scripts/rpm/harmony.spec $(RPMBUILD)/SPECS
(cd $(RPMBUILD)/SOURCES; tar cvf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION))

@ -8,8 +8,7 @@ Restart=on-failure
RestartSec=1
User=harmony
WorkingDirectory=/home/harmony
EnvironmentFile=/etc/harmony/harmony.cfg
ExecStart=harmony --run.shard ${SHARD} --run ${TYPE}
ExecStart=harmony -c /etc/harmony/harmony.cfg
StandardError=syslog
SyslogIdentifier=harmony
StartLimitInterval=0

@ -54,9 +54,7 @@ install -m 0755 harmony ${RPM_BUILD_ROOT}/usr/local/sbin/
install -m 0755 harmony-setup.sh ${RPM_BUILD_ROOT}/usr/local/sbin/
install -m 0644 harmony.service ${RPM_BUILD_ROOT}/etc/systemd/system/
install -m 0644 harmony-sysctl.conf ${RPM_BUILD_ROOT}/etc/sysctl.d/
install -m 0644 harmony-validator.cfg ${RPM_BUILD_ROOT}/etc/harmony/
install -m 0644 harmony-explorer.cfg ${RPM_BUILD_ROOT}/etc/harmony/
pushd ${RPM_BUILD_ROOT}/etc/harmony; ln -s harmony-validator.cfg harmony.cfg; popd
install -m 0644 harmony.cfg ${RPM_BUILD_ROOT}/etc/harmony/
exit 0
%post
@ -74,8 +72,6 @@ exit 0
/usr/local/sbin/harmony-setup.sh
/etc/sysctl.d/harmony-sysctl.conf
/etc/systemd/system/harmony.service
/etc/harmony/harmony-validator.cfg
/etc/harmony/harmony-explorer.cfg
/etc/harmony/harmony.cfg
%doc

Loading…
Cancel
Save