mirror of
https://github.com/unpoller/unpoller.git
synced 2026-03-31 06:24:19 -04:00
fixes
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# This file is used by deb and rpm packages.
|
||||
# FPM adds this as the after-install script.
|
||||
# This file is used by txz, deb and rpm packages.
|
||||
# FPM adds this as the after-install script to all packages.
|
||||
|
||||
if [ -x "/bin/systemctl" ]; then
|
||||
# Reload and restart - this starts the application as user nobody.
|
||||
/bin/systemctl daemon-reload
|
||||
/bin/systemctl enable unifi-poller
|
||||
/bin/systemctl restart unifi-poller
|
||||
elif [ -x /usr/sbin/service ]; then
|
||||
# Do not start or restart on freebsd. That's "bad practice."
|
||||
/usr/sbin/service unifi-poller enabled || /usr/sbin/service unifi-poller enable
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# This file is used by rpm and deb packages. FPM use.
|
||||
# This file is used by txz, rpm and deb packages. FPM use.
|
||||
|
||||
if [ "$1" = "upgrade" ] || [ "$1" = "1" ] ; then
|
||||
exit 0
|
||||
@@ -9,4 +9,7 @@ fi
|
||||
if [ -x "/bin/systemctl" ]; then
|
||||
/bin/systemctl stop unifi-poller
|
||||
/bin/systemctl disable unifi-poller
|
||||
elif [ -x /usr/sbin/service ]; then
|
||||
/usr/sbin/service unifi-poller stop
|
||||
/usr/sbin/service unifi-poller disable
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user