2008-05-22 23:58:30 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2010-06-30 22:53:20 +10:00
|
|
|
# /etc/rc.d/upsd: start/stop ups daemon
|
2008-05-22 23:58:30 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
case "$1" in
|
2008-05-23 00:30:18 +02:00
|
|
|
start)
|
|
|
|
/usr/bin/upsdrvctl start
|
2010-06-30 22:53:20 +10:00
|
|
|
/usr/sbin/upsd
|
2008-05-22 23:58:30 +02:00
|
|
|
;;
|
2008-05-23 00:30:18 +02:00
|
|
|
stop)
|
2010-06-30 22:53:20 +10:00
|
|
|
/usr/sbin/upsd -c stop
|
2008-05-22 23:58:30 +02:00
|
|
|
;;
|
2008-05-23 00:30:18 +02:00
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
sleep 1
|
|
|
|
$0 start
|
2010-06-30 22:53:20 +10:00
|
|
|
;;
|
2008-05-23 00:30:18 +02:00
|
|
|
*)
|
2010-06-30 22:53:20 +10:00
|
|
|
echo "Usage: $0 [start|stop|restart]"
|
|
|
|
exit 1
|
2008-05-22 23:58:30 +02:00
|
|
|
esac
|
|
|
|
|
|
|
|
# End of file
|