3
# Provides: battery-stats
4
# Required-Start: $remote_fs $syslog
5
# Required-Stop: $remote_fs $syslog
6
# Default-Start: 2 3 4 5
8
# Short-Description: start/stop the battery statistics collector
11
# Based on skeleton written by Miquel van Smoorenburg <miquels@cistron.nl>.
12
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
13
# Modified for battery-stats by Karl E. Jørgensen <karl@jorgensen.com>
15
PATH=/sbin:/bin:/usr/sbin:/usr/bin
16
DAEMON=/usr/sbin/battery-stats-collector
17
NAME=battery-stats-collector
18
DESC="Battery statistics collector"
20
# Please use /etc/battery-stats.conf to override these parameters.
21
SYS_ARGS="--syslog --output /var/log/battery-stats"
22
ARGS="--interval=60 --flush=10 --ignore-missing-battery"
24
CONFIG=/etc/battery-stats.conf
26
test -f $DAEMON || exit 0
37
echo -n "Starting $DESC: "
38
start-stop-daemon --background --make-pidfile --start --quiet \
39
--pidfile /var/run/$NAME.pid \
40
--exec $DAEMON -- $SYS_ARGS $ARGS
44
echo -n "Stopping $DESC: "
45
start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
49
reload|restart|force-reload)
51
# If the "reload" option is implemented, move the "force-reload"
52
# option to the "reload" entry above. If not, "force-reload" is
53
# just the same as "restart".
55
echo -n "Restarting $DESC: "
56
start-stop-daemon --stop --quiet --pidfile \
57
/var/run/$NAME.pid --exec $DAEMON
59
start-stop-daemon --background --make-pidfile --start --quiet \
60
--pidfile /var/run/$NAME.pid \
61
--exec $DAEMON -- $SYS_ARGS $ARGS
66
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
67
echo "Usage: $N {start|stop|restart|force-reload}" >&2