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