[Serusers] Restart ser application using cronjob

Ladislav Andel ladia6 at centrum.cz
Sun Apr 10 13:30:08 CEST 2005


try something like this
this script is for Suse Linux
if you have Redhat or Fedora Linux replace startproc to daemon
make sure the paths are correct

Lada

#!/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/local/ser/ser.cfg

# Source function library.
. /etc/sysconfig/network/scripts/functions

ser=/usr/local/sbin/ser
prog=ser
RETVAL=0

        echo -n $"Stopping $prog: "
        killproc $ser
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/ser /var/run/ser.pid 
        
        echo -n $"Starting $prog: "
        startproc $ser $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch /var/lock/subsys/ser 



        
  
p> Hi all,
  
p>  
  
p> I am pretty new to Ser and need help to restart the ser
p> application using a script run by the cron job, The command I am
p> using to restart the ser application in the script is “serctl stop”
p> and “serctl start”. When I try to run this script by placing it in
p> the cronjob it doesnot work. Although it works when I run it
p> manually. Can anyone help me how can I restart the SER application
p> using a script run in the cron job. I also defined the SIP_DOMAIN
p> parameter in the script itself but it did not work. The SER version
p> I have is 0.8.14
  
p>  
  
p> Thanks for your help in advance
  
p>  
  
p> Regards,
  
p> Prajyot Shirsolkar
  
p> Network Engineer,
  
p> BMX Inc.
  
p> 315-797-1822
  
p> prajyot at bmx-inc.com
  
p>  
  
  
    




More information about the sr-users mailing list