blob: 337904dbab3610bc53d1664a037f9d76648e04a6 (
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
29
|
#!/sbin/openrc-run
#
# Start 3proxy tiny proxy server.
#
CONFFILE=/etc/${SVCNAME}/${SVCNAME}.cfg
PIDFILE=/var/run/${SVCNAME}.pid
depend() {
need net
}
start() {
if [ ! -f "${CONFFILE}" ]; then
eerror "Configuration file ${CONFFILE} not found!"
return 1
fi
ebegin "Starting 3proxy"
start-stop-daemon --start --quiet --exec /usr/bin/3proxy --pidfile "${PIDFILE}" \
-- --pidfile "${PIDFILE}" --user 3proxy.3proxy "${CONFFILE}" #2>/dev/null
eend $?
}
stop() {
ebegin "Stopping 3proxy"
start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
eend $?
}
|