diff options
Diffstat (limited to 'net-misc/nut/files/upsd')
-rwxr-xr-x | net-misc/nut/files/upsd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net-misc/nut/files/upsd b/net-misc/nut/files/upsd new file mode 100755 index 000000000000..9226b7dfa18d --- /dev/null +++ b/net-misc/nut/files/upsd @@ -0,0 +1,33 @@ +#!/bin/sh +#RCUPDATE:2 3 4:75:This line is required for script management + +. /etc/rc.d/config/functions + +SERVICE=upsd +opts="start stop restart" + +PIDFILE=/var/run/upsd.pid +EXE=/usr/bin/upsd + +start() { + ebegin "Starting $SERVICE..." + start-stop-daemon --start --quiet --exec $EXE + eend $? "Started $SERVICE." "Error Starting $SERVICE." +} + +stop() { + ebegin "Stopping $SERVICE..." + start-stop-daemon --stop --quiet --exec $EXE + eend $? "Stopped $SERVICE." "Error Stopping $SERVICE." +} + +restart() { + + stop + start + +} + +doservice ${@} + + |