3 [ -f /etc
/conf.d
/xchat-bttrw
] && .
/etc
/conf.d
/xchat-bttrw
8 PID
=`pidof -o %PPID /usr/bin/xchat-bttrw`
12 stat_busy
"Starting xchat-bttrw"
15 if [ -z "$PORT" ]; then
16 # msg "You must set PORT variable in /etc/conf.d/xchat-bttrw!"
20 PARAMS
="$PARAMS --port $PORT"
23 if [ "$PROXYHOST" ] && [ "$PROXYPORT" ]; then
24 # msg "Using proxu $PROXYHOST:$PROXYPORT"
25 export PROXYHOST
="$PROXYHOST"
26 export PROXYPORT
="$PROXYPORT"
29 if [ "$BIND" ]; then PARAMS
="$PARAMS --bind $BIND"; fi
30 if [ "$LOG" ]; then PARAMS
="$PARAMS --log $LOG"; fi
31 if [ "$RESTRICT" ]; then
32 PARAMS
="$PARAMS --resctrict $RESTRICT"
35 /usr
/bin
/xchat-bttrw
$PARAMS &> /dev
/null
&
40 add_daemon xchat-bttrw
45 stat_busy
"Stopping xchat-bttrw"
46 [ ! -z "$PID" ] && kill $PID &> /dev
/null
65 echo "usage: $0 {start|stop|stopall|restart}"