A few tweaks.
This commit is contained in:
parent
4eddb527c8
commit
cbbaaa4dcc
8
Makefile
8
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
PACKAGES=`find ./cmd -mindepth 1 -maxdepth 1 -type d`
|
||||
BINARY=unifi-poller
|
||||
|
||||
all: clean test man build
|
||||
all: clean man build
|
||||
|
||||
clean:
|
||||
for p in $(PACKAGES); do rm -f `echo $${p}|cut -d/ -f3`{,.1,.1.gz}; done
|
||||
|
|
@ -22,13 +22,13 @@ test: lint
|
|||
man:
|
||||
scripts/build_manpages.sh ./
|
||||
|
||||
rpm: clean test man linux
|
||||
rpm: clean man linux
|
||||
scripts/build_linux_packages.sh rpm
|
||||
|
||||
deb: clean test man linux
|
||||
deb: clean man linux
|
||||
scripts/build_linux_packages.sh deb
|
||||
|
||||
osxpkg: clean test man darwin
|
||||
osxpkg: clean man darwin
|
||||
scripts/build_osx_package.sh
|
||||
|
||||
install: all
|
||||
|
|
|
|||
|
|
@ -3,4 +3,5 @@
|
|||
# This file is used by rpm and deb packages. FPM use.
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable unifi-poller
|
||||
systemctl restart unifi-poller
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ fi
|
|||
# Making systemd happy by telling it to reload.
|
||||
if [ -x /bin/systemctl ]; then
|
||||
/bin/systemctl --system daemon-reload
|
||||
/bin/systemctl start unifi-poller
|
||||
/bin/systemctl enable unifi-poller
|
||||
fi
|
||||
|
||||
echo "Installation Complete. Edit the config file @ /usr/local/etc/${BINARY}/up.conf"
|
||||
|
|
@ -36,7 +38,7 @@ echo "Then start the daemon with:"
|
|||
if [ -d ~/Library/LaunchAgents ]; then
|
||||
echo " launchctl load ~/Library/LaunchAgents/com.github.davidnewhall.${BINARY}.plist"
|
||||
fi
|
||||
if [ -d /etc/systemd/system ]; then
|
||||
echo " sudo /bin/systemctl start ${BINARY}"
|
||||
if [ -x /bin/systemctl ]; then
|
||||
echo " sudo /bin/systemctl restart ${BINARY}"
|
||||
fi
|
||||
echo "Examine the log file at: /usr/local/var/log/${BINARY}.log (logs may go elsewhere on linux, check syslog)"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ echo "Uninstall unifi-poller. You may need sudo on Linux. Do not use sudo on mac
|
|||
|
||||
# Stopping the daemon
|
||||
if [ -x /bin/systemctl ]; then
|
||||
/bin/systemctl stop ${BINARY}
|
||||
/bin/systemctl disable ${BINARY}
|
||||
/bin/systemctl stop ${BINARY}
|
||||
fi
|
||||
|
||||
if [ -x /bin/launchctl ] && [ -f ~/Library/LaunchAgents/com.github.davidnewhall.${BINARY}.plist ]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue