Ken, what I do is use ntpdate to set time, and fire it off by cron... 40 0,4,8,12,16,20 * * * /usr/sbin/ntpdate 65.68.232.27 (my time server) also tried netdate in place of ntpdate, though not on the ACID distro. GeorgeC Message: 4 Date: Mon, 27 Dec 2010 11:55:48 -0500 From: "Ken" <ke2n@cs.com> To: <app_rpt-users@ohnosec.org> Subject: [App_rpt-users] astdn.sh from crontab Message-ID: <000801cba5e6$ea508e00$bef1aa00$@com> Content-Type: text/plain; charset="us-ascii" I would like to sync the clock of my node every once in a while (like once a week) To do this I am using: ntpd -q I found that this kills one of my fobs (stops updating) So - I thought that I would just stop asterisk, do the time sync and start Asterisk again. I run this script from crontab /usr/local/bin/astdn.sh /usr/sbin/ntpd -q /usr/local/bin/astup.sh But when it gets to line 6 of astdn.sh (service asterisk stop) it throws an error and does not really stop Asterisk. So it kills the fob. I am thinking this error has something to with the environment that crontab runs things in . how to fix? Tnx Ken George J Csahanin W2DB Cedar Park, TX
Has anyone tried gpsd??? http://gpsd.berlios.de/ David On Mon, Dec 27, 2010 at 9:44 AM, George Csahanin <george@dyb.com> wrote:
Ken, what I do is use ntpdate to set time, and fire it off by cron...
40 0,4,8,12,16,20 * * * /usr/sbin/ntpdate 65.68.232.27 (my time server)
also tried netdate in place of ntpdate, though not on the ACID distro.
GeorgeC
Message: 4 Date: Mon, 27 Dec 2010 11:55:48 -0500 From: "Ken" <ke2n@cs.com> To: <app_rpt-users@ohnosec.org> Subject: [App_rpt-users] astdn.sh from crontab Message-ID: <000801cba5e6$ea508e00$bef1aa00$@com> Content-Type: text/plain; charset="us-ascii"
I would like to sync the clock of my node every once in a while (like once a week)
To do this I am using:
ntpd -q
I found that this kills one of my fobs (stops updating)
So - I thought that I would just stop asterisk, do the time sync and start Asterisk again.
I run this script from crontab
/usr/local/bin/astdn.sh
/usr/sbin/ntpd -q
/usr/local/bin/astup.sh
But when it gets to line 6 of astdn.sh (service asterisk stop) it throws an error and does not really stop Asterisk. So it kills the fob.
I am thinking this error has something to with the environment that crontab runs things in . how to fix?
Tnx
Ken
George J Csahanin W2DB Cedar Park, TX
_______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
I played with that way back in the 90's...yeah, plenty easier these days. GeorgeC ----- Original Message ----- From: David KE6UPI To: George Csahanin Cc: app_rpt-users@ohnosec.org Sent: Monday, December 27, 2010 11:55 AM Subject: Re: [App_rpt-users] setting time Has anyone tried gpsd??? http://gpsd.berlios.de/ David On Mon, Dec 27, 2010 at 9:44 AM, George Csahanin <george@dyb.com> wrote: Ken, what I do is use ntpdate to set time, and fire it off by cron... 40 0,4,8,12,16,20 * * * /usr/sbin/ntpdate 65.68.232.27 (my time server) also tried netdate in place of ntpdate, though not on the ACID distro. GeorgeC Message: 4 Date: Mon, 27 Dec 2010 11:55:48 -0500 From: "Ken" <ke2n@cs.com> To: <app_rpt-users@ohnosec.org> Subject: [App_rpt-users] astdn.sh from crontab Message-ID: <000801cba5e6$ea508e00$bef1aa00$@com> Content-Type: text/plain; charset="us-ascii" I would like to sync the clock of my node every once in a while (like once a week) To do this I am using: ntpd -q I found that this kills one of my fobs (stops updating) So - I thought that I would just stop asterisk, do the time sync and start Asterisk again. I run this script from crontab /usr/local/bin/astdn.sh /usr/sbin/ntpd -q /usr/local/bin/astup.sh But when it gets to line 6 of astdn.sh (service asterisk stop) it throws an error and does not really stop Asterisk. So it kills the fob. I am thinking this error has something to with the environment that crontab runs things in . how to fix? Tnx Ken George J Csahanin W2DB Cedar Park, TX _______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
Thanks George - the ntpdate command seems to be less disruptive to Asterisk's operation than ntpd. I tried it 4 times and it did not kill the fob. This server looks like the best server for me, based on a few pings 3.north-america.pool.ntp.org Its in the crontab - we'll see what happens tomorrow AM! Ken Ref: http://www.pool.ntp.org/zone/north-america
-----Original Message----- From: George Csahanin [mailto:george@dyb.com] Sent: Monday, December 27, 2010 12:44 PM To: app_rpt-users@ohnosec.org Cc: Ken Subject: setting time
Ken, what I do is use ntpdate to set time, and fire it off by cron...
40 0,4,8,12,16,20 * * * /usr/sbin/ntpdate 65.68.232.27 (my time server)
also tried netdate in place of ntpdate, though not on the ACID distro.
GeorgeC
Message: 4 Date: Mon, 27 Dec 2010 11:55:48 -0500 From: "Ken" <ke2n@cs.com> To: <app_rpt-users@ohnosec.org> Subject: [App_rpt-users] astdn.sh from crontab Message-ID: <000801cba5e6$ea508e00$bef1aa00$@com> Content-Type: text/plain; charset="us-ascii"
I would like to sync the clock of my node every once in a while (like once a week)
To do this I am using:
ntpd -q
I found that this kills one of my fobs (stops updating)
So - I thought that I would just stop asterisk, do the time sync and start Asterisk again.
I run this script from crontab
/usr/local/bin/astdn.sh
/usr/sbin/ntpd -q
/usr/local/bin/astup.sh
But when it gets to line 6 of astdn.sh (service asterisk stop) it throws an error and does not really stop Asterisk. So it kills the fob.
I am thinking this error has something to with the environment that crontab runs things in . how to fix?
Tnx
Ken
George J Csahanin W2DB Cedar Park, TX
participants (3)
-
David KE6UPI -
George Csahanin -
Ken