Combined after install scripts.
This commit is contained in:
parent
aa1a4710fc
commit
dfd4000012
|
|
@ -5,10 +5,10 @@
|
||||||
/unifi-poller*.deb
|
/unifi-poller*.deb
|
||||||
/unifi-poller*.rpm
|
/unifi-poller*.rpm
|
||||||
/unifi-poller*.pkg
|
/unifi-poller*.pkg
|
||||||
|
/unifi-poller.macos
|
||||||
|
/unifi-poller.linux
|
||||||
/vendor
|
/vendor
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*~
|
*~
|
||||||
/package_build_*
|
/package_build_*
|
||||||
/release
|
/release
|
||||||
/unifi-poller.macos
|
|
||||||
/unifi-poller.linux
|
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -82,7 +82,7 @@ $(BINARY)-$(VERSION).pkg: check_fpm package_build_osx
|
||||||
--name $(BINARY) \
|
--name $(BINARY) \
|
||||||
--version $(VERSION) \
|
--version $(VERSION) \
|
||||||
--iteration $(ITERATION) \
|
--iteration $(ITERATION) \
|
||||||
--after-install scripts/after-install-osx.sh \
|
--after-install scripts/after-install.sh \
|
||||||
--osxpkg-identifier-prefix com.github.davidnewhall \
|
--osxpkg-identifier-prefix com.github.davidnewhall \
|
||||||
--license MIT \
|
--license MIT \
|
||||||
--url $(URL) \
|
--url $(URL) \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Grafana Dashboards & Examples
|
# Grafana Dashboards & Examples
|
||||||
|
|
||||||
This folder contains 3 grafana dashboards to get you started with the new data pool.
|
This folder contains 4 grafana dashboards to get you started with the new data pool.
|
||||||
Import these into Grafana to quickly visualize data from your devices.
|
Import these into Grafana to quickly visualize data from your devices.
|
||||||
Created with Grafana 6.2.
|
Created with Grafana 6.2.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# This file is used by osxpkg packages. FPM use.
|
|
||||||
|
|
||||||
# Copy the config file into place if it does not exist.
|
|
||||||
if [ ! -f /usr/local/etc/unifi-poller/up.conf ] && [ -f /usr/local/etc/unifi-poller/up.conf.example ]; then
|
|
||||||
cp /usr/local/etc/unifi-poller/up.conf.example /usr/local/etc/unifi-poller/up.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Allow admins to change the configuration and write logs.
|
|
||||||
chgrp -R admin /usr/local/etc/unifi-poller
|
|
||||||
chmod -R g+wr /usr/local/etc/unifi-poller
|
|
||||||
|
|
||||||
# Make sure admins can write logs.
|
|
||||||
chgrp admin /usr/local/var/log
|
|
||||||
chmod g=rwx /usr/local/var/log
|
|
||||||
|
|
||||||
# This starts it as root. no no no .... not sure how to fix that.
|
|
||||||
# launchctl load /Library/LaunchAgents/com.github.davidnewhall.unifi-poller.plist
|
|
||||||
|
|
@ -1,7 +1,27 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# This file is used by rpm and deb packages. FPM use.
|
# This file is used by deb, rpm and osx packages.
|
||||||
|
# FPM adds this as the after-install script.
|
||||||
|
|
||||||
systemctl daemon-reload
|
if [ "$(uname -s)" = "Darwin" ]; then
|
||||||
systemctl enable unifi-poller
|
# Copy the config file into place if it does not exist.
|
||||||
systemctl restart unifi-poller
|
if [ ! -f /usr/local/etc/unifi-poller/up.conf ] && [ -f /usr/local/etc/unifi-poller/up.conf.example ]; then
|
||||||
|
cp /usr/local/etc/unifi-poller/up.conf.example /usr/local/etc/unifi-poller/up.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Allow admins to change the configuration and write logs.
|
||||||
|
chgrp -R admin /usr/local/etc/unifi-poller
|
||||||
|
chmod -R g+wr /usr/local/etc/unifi-poller
|
||||||
|
|
||||||
|
# Make sure admins can write logs.
|
||||||
|
chgrp admin /usr/local/var/log
|
||||||
|
chmod g=rwx /usr/local/var/log
|
||||||
|
|
||||||
|
# This starts it as root. no no no .... not sure how to fix that.
|
||||||
|
# launchctl load /Library/LaunchAgents/com.github.davidnewhall.unifi-poller.plist
|
||||||
|
|
||||||
|
elif [ -x "/bin/systemctl" ]; then
|
||||||
|
/bin/systemctl daemon-reload
|
||||||
|
/bin/systemctl enable unifi-poller
|
||||||
|
/bin/systemctl restart unifi-poller
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue