25 lines
279 B
Bash
25 lines
279 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/upsd: start/stop ups daemon
|
|
#
|
|
|
|
case "$1" in
|
|
start)
|
|
/usr/bin/upsdrvctl start
|
|
/usr/sbin/upsd
|
|
;;
|
|
stop)
|
|
/usr/sbin/upsd -c stop
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [start|stop|restart]"
|
|
exit 1
|
|
esac
|
|
|
|
# End of file
|