]> git.pld-linux.org Git - packages/ggrelay.git/blob - ggrelay-init.patch
--corrected init script
[packages/ggrelay.git] / ggrelay-init.patch
1 --- ggrelay-1.0-rc5A/scripts/ggrelay.orig       2004-02-07 19:17:12.000000000 +0100
2 +++ ggrelay-1.0-rc5A/scripts/ggrelay    2004-02-07 20:23:18.000000000 +0100
3 @@ -3,28 +3,35 @@
4  # chkconfig: - 90 25
5  # description: Gadu-Gadu relaying agent (proxy) daemon
6  
7 +[ -f /etc/ggrelay/ggrelay.conf ] || exit 0
8 +
9  # Source function library.
10  . /etc/rc.d/init.d/functions
11  
12 +
13  RETVAL=0
14  
15  start() {
16 -    echo -n $"Starting ggrelay: "
17 -    daemon --check ggrelay xargs ggrelay -d \
18 -               < /etc/ggrelay/ggrelay.conf
19 -    RETVAL=$?
20 -    echo
21 -    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ggrelay
22 +       if [ ! -f /var/lock/subsys/ggrelay ]; then
23 +           msg_starting "GGrelay"
24 +           daemon ggrelay -d "$(cat /etc/ggrelay/ggrelay.conf)"
25 +           RETVAL=$?
26 +           [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ggrelay
27 +       else
28 +               msg_already_running "GGrelay"
29 +       fi
30  }
31  
32  stop() {
33 -    echo -n $"Stopping ggrelay: "
34 -    killproc ggrelay
35 -    RETVAL=$?
36 -    echo
37 -    if [ $RETVAL -eq 0 ]; then
38 -        rm -f /var/lock/subsys/ggrelay
39 -    fi
40 +       if [ -f /var/lock/subsys/ggrelay ]; then
41 +               msg_stopping "GGrelay"
42 +               busy
43 +               killproc ggrelay
44 +               rm -f /var/lock/subsys/ggrelay > /dev/null 2>&1
45 +               ok
46 +       else
47 +               msg_not_running "GGrelay"
48 +       fi      
49  }
50  
51  # See how we were called.
This page took 0.062625 seconds and 4 git commands to generate.