--- opensips-1.4.2-tls-old/arch/opensips.init 1970-01-01 02:00:00.000000000 +0200 +++ opensips-1.4.2-tls/packaging/arch/opensips.init 2008-10-14 18:22:44.000000000 +0200 @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Startup script for OpenSIPS +# ARCHLINUX +# Done by Sherif Nagy AKA DarKnesS_WolF sherif.nagy@gmail.com +# pidfile: /var/run/opensips.pid + +. /etc/rc.conf +. /etc/rc.d/functions + + +case "$1" in +start) + stat_busy "Starting OpenSIPs" + if [ -r /var/run/opensips.pid ]; then + echo "OpenSIPs already running. $0 will exit now." + exit 1 + fi + opensips -P /var/run/opensips.pid >> /dev/null 2&>1 + stat_done + ;; +stop) + stat_busy "Stopping OpenSIPs" + kill `cat /var/run/opensips.pid` + stat_done + ;; +restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo $"Usage: $0 {start|stop|restart}" +esac +exit 0