Sisyphus repository
Last update: 20 august 2019 | SRPMs: 17340 | Visits: 14667301
en ru br
ALT Linux repos
S:0.6.1-alt1.qa1
5.0: 0.5.3k-alt4
4.1: 0.5.3k-alt3.M41.1
4.0: 0.5.3k-alt3.M40.1

Group :: System/Servers
RPM: 3proxy

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# Init file for Software Watchdog daemon.
#
# Written by Dag Wieers <dag@wieers.com>.
# Rewrote for ALT Linux by Pavlov Konstantin <thresh@altlinux.ru>
#
# chkconfig: - 02 98
# description: 3proxy Proxy Server
#
# processname: 3proxy
# config: /etc/3proxy.conf
# pidfile: /var/run/3proxy.pid

WITHOUT_RC_COMPAT=1

. /etc/init.d/functions

### Default variables
NAME=3proxy
USER=_3proxy
CONFIG=/etc/$NAME.conf
PROXY=/usr/bin/$NAME
RETVAL=0
PIDFILE=/var/run/$NAME/pid
LOCKFILE=/var/lock/subsys/$NAME

SourceIfNotEmpty /etc/sysconfig/$NAME

start() {
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user $USER -- $PROXY -p $PIDFILE -c $CONFIG -d -u $USER
RETVAL=$?
return $RETVAL
}

stop() {
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user $USER -- $NAME
RETVAL=$?
return $RETVAL
}

restart() {
stop
start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condrestart)
[ -e $LOCKFILE ] && restart
RETVAL=$?
;;
condstop)
[ -e $LOCKFILE ] && stop
RETVAL=$?
;;
status)
status --pidfile "$PIDFILE" --expect-user $USER $NAME
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
RETVAL=1
;;
esac

exit $RETVAL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin