Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-31 Thread Hinkie
- From: "Robert Huff" <[EMAIL PROTECTED]> To: "Hinkie" <[EMAIL PROTECTED]> Sent: Saturday, September 01, 2007 2:45 PM Subject: Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up) Hello: > from edit.php create / write into new file /us

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-31 Thread Hinkie
Dear People As a courtesy to anyone interested I have finally sovled this (I hope), this is what I did, this is on a FreeBSD pfSense firewall router. Essentially the fix is to ping the static IP's first hop, if this is down then flick the WAN NIC state down and up, this restores the lost conne

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Eric Crist
ume if it won't run here then crontab won't run it either? Kind regards David Hingston - Original Message - From: "Eric Crist" <[EMAIL PROTECTED]> To: "Hinkie" <[EMAIL PROTECTED]> Cc: Sent: Thursday, August 30, 2007 7:30 AM Subject: Re: FreeBS

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Giorgos Keramidas
On 2007-08-29 14:18, Eric Crist <[EMAIL PROTECTED]> wrote: >On Aug 29, 2007, at 1:54 PMAug 29, 2007, Giorgos Keramidas wrote: >> On 2007-08-29 18:51, Wojciech Puchar <[EMAIL PROTECTED]> >> wrote: >>> fragment from my test program (used for other thing but doesn't matter) >>> >>> /sbin/ping -i 0.5 -

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Hinkie
ere then crontab won't run it either? Kind regards David Hingston - Original Message - From: "Eric Crist" <[EMAIL PROTECTED]> To: "Hinkie" <[EMAIL PROTECTED]> Cc: Sent: Thursday, August 30, 2007 7:30 AM Subject: Re: FreeBSD Cron Job to run (ifconfig

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Eric Crist
can tell I am learning this syntax! Can you help me further? With thanks David Hingston - Original Message - From: "Eric Crist" <[EMAIL PROTECTED]> To: "Hinkie" <[EMAIL PROTECTED]> Cc: Sent: Thursday, August 30, 2007 2:17 AM Subject: Re: FreeBSD Cr

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Eric Crist
On Aug 29, 2007, at 1:54 PMAug 29, 2007, Giorgos Keramidas wrote: On 2007-08-29 18:51, Wojciech Puchar <[EMAIL PROTECTED]> wrote: fragment from my test program (used for other thing but doesn't matter) /sbin/ping -i 0.5 -s 1450 -c 3 tested_host >/dev/null 2>/dev/null if [ $? != 0 ];then p

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Hinkie
me further? With thanks David Hingston - Original Message - From: "Eric Crist" <[EMAIL PROTECTED]> To: "Hinkie" <[EMAIL PROTECTED]> Cc: Sent: Thursday, August 30, 2007 2:17 AM Subject: Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up) O

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Giorgos Keramidas
On 2007-08-29 18:51, Wojciech Puchar <[EMAIL PROTECTED]> wrote: > fragment from my test program (used for other thing but doesn't matter) > > /sbin/ping -i 0.5 -s 1450 -c 3 tested_host >/dev/null 2>/dev/null > if [ $? != 0 ];then > perform_action_if_doesnt_ping > fi I'm not sure if '!=' is a 'po

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Wojciech Puchar
fragment from my test program (used for other thing but doesn't matter) /sbin/ping -i 0.5 -s 1450 -c 3 tested_host >/dev/null 2>/dev/null if [ $? != 0 ];then perform_action_if_doesnt_ping fi ___ freebsd-questions@freebsd.org mailing list http://list

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Giorgos Keramidas
On 2007-08-30 01:03, Hinkie <[EMAIL PROTECTED]> wrote: > Hi > > I want to run a cron job in /etc/crontab that runs (ifconfig em0 down; > ifconfig em0 up) if my cables static ip gateway can't be pinged but I > can't figure it out. I can't get the syntax that runs in the command > window, to then pu

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Mak Kolybabi
> Here's what I'd use: > ping -c 1 a.b.c.d; TESTV=$?; if [ $TESTV != 0 ]; then `ifconfig em0 down`; I'd suggest something more like: ping -c 1 $host [ $? -eq 0 ] && ifconfig em0 down && ifconfig em0 up or ping -c 1 $host if [ $? -eq 0 ]; then ifconfig em0 down && ifconfig em0 up fi --

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Eric Crist
On Aug 29, 2007, at 8:03 AMAug 29, 2007, Hinkie wrote: Hi I want to run a cron job in /etc/crontab that runs (ifconfig em0 down; ifconfig em0 up) if my cables static ip gateway can't be pinged but I can't figure it out. I can't get the syntax that runs in the command window, to then put

Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)

2007-08-29 Thread Reid Linnemann
Written by Hinkie on 08/29/07 08:03>> Hi I want to run a cron job in /etc/crontab that runs (ifconfig em0 down; ifconfig em0 up) if my cables static ip gateway can't be pinged but I can't figure it out. I can't get the syntax that runs in the command window, to then put intot the crontab