1
Files
qnap-rc-scripts/ups.sh
2016-09-04 22:20:40 +03:00

25 lines
431 B
Bash
Executable File

#!/bin/sh
case "$1" in
start)
# Start daemons.
UPS_DRV=`/sbin/getcfg qnapups driver -d "" -f /etc/config/ups/ups.conf`
/etc/init.d/usb_ups.sh start "$UPS_DRV"
/etc/init.d/snmp_ups.sh start
;;
stop)
# Stop daemons.
/etc/init.d/usb_ups.sh stop
/etc/init.d/snmp_ups.sh stop
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac