blob: 5c55b05ec0fe7a0608db8c6ff730f4b52ab5e905 (
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/runscript
#
# 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 $?
}
|