diff --git a/Makefile b/Makefile index 0c29c7d..16a051a 100644 --- a/Makefile +++ b/Makefile @@ -74,12 +74,12 @@ install-common: # Set up directories mkdir -p $(DESTDIR)/etc/$(PACKAGE_NAME) mkdir -p ${DESTDIR}/etc/logrotate.d - mkdir -p $(DESTDIR)/usr/local/bin + mkdir -p $(DESTDIR)/usr/bin mkdir -p $(DESTDIR)/usr/share/man/man1 # Install script - cp $(SCRIPT) $(DESTDIR)/usr/local/bin/$(PACKAGE_NAME) - chmod 755 $(DESTDIR)/usr/local/bin/$(PACKAGE_NAME) + cp $(SCRIPT) $(DESTDIR)/usr/bin/$(PACKAGE_NAME) + chmod 755 $(DESTDIR)/usr/bin/$(PACKAGE_NAME) # Install manpage cp manpages/* $(DESTDIR)/usr/share/man/man1/ @@ -113,6 +113,7 @@ install-openrc: # Install init script cp openrc/pgmon.initd $(DESTDIR)/etc/init.d/pgmon + chmod 755 $(DESTDIR)/etc/init.d/pgmon # Install init script config file cp openrc/pgmon.confd $(DESTDIR)/etc/conf.d/pgmon diff --git a/RPM/pgmon-el7.spec b/RPM/pgmon-el7.spec index cf3b12d..3b880c2 100644 --- a/RPM/pgmon-el7.spec +++ b/RPM/pgmon-el7.spec @@ -28,7 +28,7 @@ make -C /src install-systemd DESTDIR=%{buildroot} /etc/pgmon/pgmon-service.conf /lib/systemd/system/pgmon.service /lib/systemd/system/pgmon@.service -/usr/local/bin/pgmon +/usr/bin/pgmon /usr/share/man/man1/pgmon.1.gz %post diff --git a/RPM/pgmon.spec b/RPM/pgmon.spec index 8a7d5e7..5f7facf 100644 --- a/RPM/pgmon.spec +++ b/RPM/pgmon.spec @@ -28,7 +28,7 @@ make -C /src install-systemd DESTDIR=%{buildroot} /etc/pgmon/pgmon-service.conf /lib/systemd/system/pgmon.service /lib/systemd/system/pgmon@.service -/usr/local/bin/pgmon +/usr/bin/pgmon /usr/share/man/man1/pgmon.1.gz %post diff --git a/systemd/pgmon@.service b/systemd/pgmon@.service index a17860a..af43032 100644 --- a/systemd/pgmon@.service +++ b/systemd/pgmon@.service @@ -7,7 +7,7 @@ After=network.target [Service] EnvironmentFile=/etc/pgmon/%i-service.conf User=${SERVICE_USER:-postgres} -ExecStart=/usr/local/bin/pgmon -c /etc/pgmon/%i.yml +ExecStart=/usr/bin/pgmon -c /etc/pgmon/%i.yml ExecReload=kill -HUP $MAINPID Restart=on-failure Type=exec