[Serusers] ser init script (fedora core 2)

Shi Hoch shi at i-p-hi.com
Sun Aug 1 11:58:24 CEST 2004


Hope it will be useful.

 

#!/bin/bash

#

# Startup script for SER

#

# chkconfig: 345 85 15

# description: Ser is a fast SIP Proxy.

#

# processname: ser

# pidfile: /var/run/ser.pid

# config: /etc/ser/ser.cfg

 

# Source function library.

. /etc/rc.d/init.d/functions

 

ser=/sbin/ser

prog=ser

RETVAL=0

OPTIONS="-P /var/run/ser.pid"

 

start() {

        echo -n $"Starting $prog: "

        daemon $ser $OPTIONS

        RETVAL=$?

        echo

        [ $RETVAL = 0 ] && touch /var/lock/subsys/ser

        return $RETVAL

}

 

stop() {

      echo -n $"Stopping $prog: "

      killproc $ser

      RETVAL=$?

      echo

      [ $RETVAL = 0 ] && rm -f /var/lock/subsys/ser /var/run/ser.pid

}

 

reload() {

      echo -n $"Reloading $prog: "

      killproc $ser -HUP

      RETVAL=$?

      echo

}

 

# See how we were called.

case "$1" in

  start)

      start

      ;;

  stop)

      stop

      ;;

  status)

        status $ser

      RETVAL=$?

      ;;

  restart)

      stop

      start

      ;;

  condrestart)

      if [ -f /var/run/ser.pid ] ; then

            stop

            start

      fi

      ;;

  *)

      echo $"Usage: $prog {start|stop|restart|condrestart|status|help}"

      exit 1

esac

 

exit $RETVAL

 

 

Shi Hoch

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20040801/7ffe6437/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ser
Type: application/octet-stream
Size: 1098 bytes
Desc: ser
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20040801/7ffe6437/attachment.obj>


More information about the sr-users mailing list