]> git.pld-linux.org Git - packages/PyMSNt.git/blame_incremental - PyMSNt.init
- added bugfixes from gentoo
[packages/PyMSNt.git] / PyMSNt.init
... / ...
CommitLineData
1#!/bin/sh
2# Jabber MSN transport
3#
4# chkconfig: 345 85 05
5# description: Jabber MSN 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
23start() {
24 # Check if the service is already running?
25 if [ ! -f /var/lock/subsys/PyMSNt ]; then
26 msg_starting "Jabber MSN transport"
27 daemon /usr/share/pymsnt/PyMSNt.py -c /etc/jabber/PyMSNt.xml
28 RETVAL=$?
29 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/PyMSNt
30 else
31 msg_already_running PyMSNt
32 fi
33}
34
35stop() {
36 # Check if the service is already running?
37 if [ -f /var/lock/subsys/PyMSNt ]; then
38 msg_stopping "Jabber MSN transport"
39 killproc --pidfile /var/run/PyMSNt.pid PyMSNt
40 rm -f /var/lock/subsys/PyMSNt
41 else
42 msg_not_running PyMSNt
43 fi
44}
45
46RETVAL=0
47# See how we were called.
48case "$1" in
49 start)
50 start
51 ;;
52 stop)
53 stop
54 ;;
55 restart|force-reload)
56 stop
57 start
58 ;;
59 status)
60 status PyMSNt.py
61 exit $?
62 ;;
63 *)
64 msg_usage "$0 {start|stop|restart|force-reload|status}"
65 exit 3
66esac
67
68exit $RETVAL
This page took 0.03228 seconds and 4 git commands to generate.