2014-12-11 - Re: [GRASE-Hotspot] crontab and network interface restart
Header Data
From: Timothy White <ti***8@gmail.com>
Message Hash: 1784da8fde0a989d63b6c7dec7eb40cdd6c6ec956525e0d8993477fcb862c740
Message ID: <CAESLx0+va2bphhxy9KFxrUVjWBXvcAATWaOZhxkiSBc9Amy-EA@mail.gmail.com>
Reply To: <1a88193c-06c5-4934-b60f-55ae6fd74f7c@grasehotspot.org>
UTC Datetime: 2014-12-11 01:36:48 UTC
Raw Date: Thu, 11 Dec 2014 18:36:48 +1000
Raw message
I would take off the >> /home/network.txt and ensure you have mail setup,
as then Cron will capture the output and email it to you.
Alternatively, you need to ensure you catch both stderr and stdout, by
default you are just capturing stdout.
See http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html
Having said all that, you'll probably find that restarting networking won't
fix a faulty card, as often its a card lockup which needs the usb to be
reset (unplugged and plugged back in)
Tim
On Thu, Dec 11, 2014 at 12:14 PM, bartosz <ba***z@miklaszewski.com> wrote:
> Hi guys,
>
> i am having some small issue with my hotspot, as I thought it will be good
> to have small server i bough Intel next unit of computing, as it comes with
> one ethernet, i bought usb one for lan. so from time to time networks freez
> every couple few days. ( i know i will never buy usb card again :)))))
>
> so i am trying to find out is it usb card get funny, so what ive done is:
>
> from root ive run crontab -e to restart network interfaces every 12h
>
> 5 * * * * root /home/networkreset.sh >> /home/network.txt
> (its 5 min just to try is it working)
>
> /home/networkreset.sh
> /etc/init.d/networking restart
>
> in logs show:
> Dec 11 02:02:01 harrys CRON[5756]: (root) CMD (root /home/networkreset.sh
> >> /home/network.txt)
>
> so its working but in file: /home/network.txt is empty :(
>
> HOW TO CHECK IS MY INTERFACE RESTART WORKS?
>
>
>
>
> --
> This mailing list is for the Grase Hotspot Project http://grasehotspot.org
> ---
> You received this message because you are subscribed to the Google Groups
> "Grase Hotspot" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gr***e@grasehotspot.org.
> To post to this group, send email to gr***t@grasehotspot.org.
> Visit this group at
> http://groups.google.com/a/grasehotspot.org/group/grase-hotspot/.
> To view this discussion on the web visit
> https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/1a88193c-06c5-4934-b60f-55ae6fd74f7c%40grasehotspot.org
> <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/1a88193c-06c5-4934-b60f-55ae6fd74f7c%40grasehotspot.org?utm_medium=email&utm_source=footer>
> .
>
Thread
-
Return to December 2014
- Return to “bartosz <ba***z@miklaszewski.com>”
-
Return to “Timothy White <ti***8@gmail.com>”
- 2014-12-10 (Wed, 10 Dec 2014 18:14:48 -0800) - crontab and network interface restart - bartosz <ba***z@miklaszewski.com>
- 2014-12-11 (Thu, 11 Dec 2014 18:36:48 +1000) - Re: [GRASE-Hotspot] crontab and network interface restart - Timothy White <ti***8@gmail.com>