blob: 4ff1e6442cdc438bfb558a2cf77d405f2ddafb45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/sbin/openrc-run
COLLECTD_USER=${COLLECTD_USER:-"collectd"}
COLLECTD_GROUP=${COLLECTD_GROUP:-"collectd"}
COLLECTD_ARGS=${COLLECTD_ARGS:-""}
COLLECTD_PIDFILE=${COLLECTD_PIDFILE:-"/run/collectd/collectd.pid"}
command=/usr/sbin/collectd
pidfile="$COLLECTD_PIDFILE"
command_args="${COLLECTD_ARGS} -P $pidfile"
start_stop_daemon_args="--user ${COLLECTD_USER}:${COLLECTD_GROUP}"
retry=${COLLECTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
start_pre() {
checkpath --directory --owner "$COLLECTD_USER":"$COLLECTD_GROUP" \
--mode 0770 "$(dirname $pidfile)" /var/lib/collectd
}
|