[Asterisk-Users] Graceful CLI/crontab reboot

Henry Devito hdevito at qwest.net
Wed Oct 20 10:24:19 MST 2004


Wouldn't this work?
Just drop this script in the cron.daily directory and modify /etc/crontab
 
//script//
#!/bin/bash
asterisk -rx "restart gracefully"
 
 
/etc/crontab
root at pingu # cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
 
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 2 * * * root run-parts /etc/cron.daily  --This tells it run scripts in
the cron.daily directory at 2am
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
 
 
 
 
  _____  

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Andrew Edmond
Sent: Wednesday, October 20, 2004 12:15 PM
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] Graceful CLI/crontab reboot
 
Asterisk Community --
 
I'm looking for a way to gracefully shutdown asterisk at least once a day
and bring it back online.  I'm using Gentoo Linux and using safe_asterisk
from /etc/init.d/asterisk.
 
Anybody have a handy CLI/crontab script that accomplishes this?
 
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041020/5124243b/attachment.htm


More information about the asterisk-users mailing list