summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/msn-transport/files/msn-transport.init-r2')
-rw-r--r--net-im/msn-transport/files/msn-transport.init-r233
1 files changed, 33 insertions, 0 deletions
diff --git a/net-im/msn-transport/files/msn-transport.init-r2 b/net-im/msn-transport/files/msn-transport.init-r2
new file mode 100644
index 000000000000..faf0e1d40996
--- /dev/null
+++ b/net-im/msn-transport/files/msn-transport.init-r2
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ use jabber-server
+}
+
+start() {
+ ebegin "Starting MSN Jabber Transport"
+ if [ -f ${PIDFILE} ]; then
+ if [ -z $(ps ax | grep `cat ${PIDFILE}` | grep -v grep ) ]
+ then
+ rm -f ${PIDFILE}
+ fi
+ fi
+
+ /usr/sbin/jabberd -B -c ${CONFIG} -H /var/spool/jabber >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stoping MSN Jabber Transport"
+ if [ -f ${PIDFILE} ]; then
+ kill `cat ${PIDFILE}`
+ fi
+ sleep 2
+ if [ -f ${PIDFILE} ]; then
+ kill -9 `cat ${PIDFILE}`
+ rm -f ${PIDFILE}
+ fi
+ rm -f ${PIDFILE}
+ eend $?
+}