]> git.pld-linux.org Git - packages/PyICQt.git/blob - PyICQt.init
- added pyicqt to start daemon in background,
[packages/PyICQt.git] / PyICQt.init
1 #!/bin/sh
2 # Jabber ICQ transport
3 #
4 # chkconfig:    345 85 05
5 # description:  Jabber ICQ transport
6
7 # Source function library
8 . /etc/rc.d/init.d/functions
9
10 # Get network config
11 . /etc/sysconfig/network
12
13 # Check that networking is up.
14 if is_yes "${NETWORKING}"; then
15         if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
16                 msg_network_down pyICQt
17                 exit 1
18         fi
19 else
20         exit 0
21 fi
22
23 RETVAL=0
24 # See how we were called.
25 case "$1" in
26   start)
27         # Check if the service is already running?
28         if [ ! -f /var/lock/subsys/PyICQt ]; then
29                 msg_starting "Jabber ICQ transport"
30                 daemon /usr/sbin/pyicqt.sh /etc/jabber/PyICQt.xml
31                 RETVAL=$?
32                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/PyICQt
33         else
34                 msg_already_running PyICQt
35         fi
36         ;;
37   stop)
38         # Check if the service is already running?
39         if [ -f /var/lock/subsys/PyICQt ]; then
40                 msg_stopping  "Jabber ICQ transport"
41                 killproc --pidfile /var/run/PyICQt.pid PyICQt
42                 rm -f /var/lock/subsys/PyICQt
43         else
44                 msg_not_running PyICQt
45         fi
46         ;;
47   restart|force-reload)
48         $0 stop
49         $0 start
50         exit $?
51         ;;
52   status)
53         status PyICQt.py
54         exit $?
55         ;;
56   *)
57         msg_usage "$0 {start|stop|restart|force-reload|status}"
58         exit 3
59 esac
60
61 exit $RETVAL
This page took 0.102371 seconds and 3 git commands to generate.