#!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # doesn't work with none x86/amd64 processors #depend() { # use lm_sensors #} start() { if [[ ( ${START_SERVER} == 'true' ) ]]; then /sbin/start-stop-daemon --quiet --start --pidfile /var/run/collectd-server.pid --exec /usr/sbin/collectd -- -s -D ${DATA_BASEDIR} fi if [[ ( ${START_CLIENT} == 'true' ) ]]; then /sbin/start-stop-daemon --quiet --start --pidfile /var/run/collectd-client.pid --exec /usr/sbin/collectd -- -c -D ${DATA_BASEDIR} $(for p in ${PING_HOSTS:-}; do echo -p $p ; done) fi if [[ ( ${START_SERVER} != 'true' ) && ( ${START_CLIENT} != 'true' ) ]]; then /sbin/start-stop-daemon --quiet --start --pidfile /var/run/collectd.pid --exec /usr/sbin/collectd -- -D ${DATA_BASEDIR} $(for p in ${PING_HOSTS:-}; do echo -p $p ; done) fi } stop() { # if [[ ( ${START_SERVER} == 'true' ) ]]; then # /sbin/start-stop-daemon --quiet --stop --signal INT --pidfile /var/run/collectd-server.pid # fi # if [[ ( ${START_CLIENT} == 'true' ) ]]; then # /sbin/start-stop-daemon --quiet --stop --signal INT --pidfile /var/run/collectd-client.pid # fi # if [[ ( ${START_SERVER} != 'true' ) && ( ${START_CLIENT} != 'true' ) ]]; then # /sbin/start-stop-daemon --quiet --stop --signal INT --pidfile /var/run/collectd.pid # fi # untill PIDs are can be set per client/server /sbin/start-stop-daemon --quiet --stop --signal INT --pidfile /var/run/collectd.pid }