On Wed, Oct 18, 2000 at 09:16:23PM +1000, Dave Kempe wrote:
> Hey sluggers,
> I'm very newbie at writing scripts or any sort of programming really.
> Wondering where I would start to write a script that checked to see if the
> PPP link was up and if it wasn't brought it up? I know that the modem lock
> files would be useful cos nothing else uses the modem, so the existance of
> /var/lock/LCK..ttyS0 is reasonable. Or is there a better way in /proc
> something.
Write the script anyway but as usual there's an easier way. If
you're talking about a permament connection and you want to make sure it
stays up, as long as you setup ppp correctly ie using a chat script. ie
to start your connection you can do something like
pppd call provider
then all you need todo is give ppp the persist option and it will dial
back in autimatically.
>
> The other question i have is how to understand the entries in crontab.
> I have read a few cron tutuorials, and still don't exactly understand how to
> make cron do something once an hour or once a day.
> I don't exactly understand what each column means in the 6 or so *'s that
> are at the start of the crontab entry. Anyone care to share the secret?
* * * * * some command
minute hour day_of_month month day_of_week
0-59 0-24 1-31 1-12 or Jan-Dec 0-7 or Sun-Sat
for day of the week 0 or 7 are Sunday
you can also do stuff like */2 which is every 2 minutes if it's in the
first field or
mon-wed,sun
for more info
man 5 crontab
>
> thanks,
>
> Dave
>
>
>
>
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://slug.org.au/lists/listinfo/slug
--
John
The difference between a good man and a bad one is the
choice of cause - William James
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug