blob: 7670659a0f2d56f4c0fb61a7b602f61a56003538 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
INSTANCE="${SVCNAME#*.}"
if [ -z "${INSTANCE}" -o "${SVCNAME}" = "apcupsd" ]; then
INSTANCE="apcupsd"
fi
name="APC UPS Daemon"
pidfile=/var/run/${SVCNAME}.pid
command=/sbin/apcupsd
command_args="-f /etc/apcupsd/${INSTANCE}.conf -P ${pidfile}"
start_stop_daemon_args="--wait 300 --retry TERM/5/TERM/5"
depend() {
use net
after udev
}
start_pre() {
rm -f /etc/apcupsd/powerfail
export SERVICE="${SVCNAME}"
}
|