26 lines
527 B
Plaintext
26 lines
527 B
Plaintext
|
#!/bin/sh /etc/rc.common
|
||
|
START=79
|
||
|
|
||
|
start() {
|
||
|
### replace shipped config with symlink
|
||
|
mkdir -p /var/etc
|
||
|
if [ ! -L /etc/collectd.conf ]; then
|
||
|
test -f /etc/collectd.conf && mv /etc/collectd.conf /etc/collectd.conf.bak
|
||
|
ln -s /var/etc/collectd.conf /etc/collectd.conf
|
||
|
fi
|
||
|
|
||
|
### create config
|
||
|
/usr/bin/stat-genconfig > /var/etc/collectd.conf
|
||
|
|
||
|
### workaround broken permissions on /tmp
|
||
|
chmod 1777 /tmp
|
||
|
}
|
||
|
|
||
|
restart() {
|
||
|
### regenerate config / prepare environment
|
||
|
start
|
||
|
|
||
|
### restart collectd
|
||
|
/etc/init.d/collectd restart
|
||
|
}
|