diff --git a/Makefile b/Makefile index 131846375..e9611fd00 100644 --- a/Makefile +++ b/Makefile @@ -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)) diff --git a/scripts/rpm/harmony.service b/scripts/rpm/harmony.service index 8d2793e57..ae31d223a 100644 --- a/scripts/rpm/harmony.service +++ b/scripts/rpm/harmony.service @@ -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 diff --git a/scripts/rpm/harmony.spec b/scripts/rpm/harmony.spec index 38dd978b6..e212b0822 100644 --- a/scripts/rpm/harmony.spec +++ b/scripts/rpm/harmony.spec @@ -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