]> git.pld-linux.org Git - packages/PyMSNt.git/blame - PyMSNt.init
- init, NFY!
[packages/PyMSNt.git] / PyMSNt.init
CommitLineData
98fc0a40 1#!/bin/sh
2# Jabber GaduGadu transport
3#
4# chkconfig: 345 85 05
5# description: Jabber GaduGadu 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.
14if is_yes "${NETWORKING}"; then
15 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
16 msg_network_down pyMSNt
17 exit 1
18 fi
19else
20 exit 0
21fi
22
23RETVAL=0
24# See how we were called.
25case "$1" in
26 start)
27 # Check if the service is already running?
28 if [ ! -f /var/lock/subsys/PyMSNt ]; then
29 msg_starting "Jabber MSN transport"
30 daemon PyMSNt -c /etc/jabber/PyMSNt.xml
31 RETVAL=$?
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/PyMSNt
33 else
34 msg_already_running pyMSNt
35 fi
36 ;;
37 stop)
38 # Check if the service is already running?
39 if [ -f /var/lock/subsys/PyMSNt ]; then
40 msg_stopping "Jabber MSN transport"
41 killproc PyMSNt
42 rm -f /var/lock/subsys/PyMSNt
43 else
44 msg_not_running PyMSNt
45 fi
46 ;;
47 restart|force-reload)
48 $0 stop
49 $0 start
50 exit $?
51 ;;
52 status)
53 status PyMSNt
54 exit $?
55 ;;
56 *)
57 msg_usage "$0 {start|stop|restart|force-reload|status}"
58 exit 3
59esac
60
61exit $RETVAL
This page took 0.990034 seconds and 4 git commands to generate.