fixes freebsd package

This commit is contained in:
Cody Lee
2022-12-22 16:09:55 -06:00
parent c833c1d5e5
commit 3bd43bfc7a
3 changed files with 55 additions and 12 deletions

View File

@@ -13,7 +13,7 @@ real_name="unpoller"
rcvar="unpoller_enable"
unpoller_command="/usr/local/bin/${real_name}"
unpoller_user="unpoller"
unpoller_config="/usr/local/etc/${real_name}/{{CONFIG_FILE}}"
unpoller_config="/usr/local/etc/${real_name}/up.conf"
pidfile="/var/run/${real_name}/pid"
# This runs `daemon` as the `unpoller_user` user.
@@ -27,6 +27,10 @@ load_rc_config ${name}
mkdir -p $(dirname ${pidfile})
chown -R $unpoller_user $(dirname ${pidfile})
# ensure log directory exists
mkdir -p /usr/local/var/log/${real_name}
chown -R $unpoller_user /usr/local/var/log/${real_name}
# Suck in optional exported override variables.
# ie. add something like the following to this file: export UP_POLLER_DEBUG=true
[ -f "/usr/local/etc/defaults/${real_name}" ] && . "/usr/local/etc/defaults/${real_name}"