Difference between revisions of "PPP Auto Check Crontab"

From MS Computech
Jump to: navigation, search
(Created page with ''''July 09 2009''' '''PPP Auto check use crontab''' <pre> mkdir /app nano /app/check_connection.sh </pre> <source lang=bash> #!/bin/bash PATH=$PATH:/sbin # Make sure ppp0 is sti…')
(No difference)

Revision as of 15:41, 9 July 2009

July 09 2009 PPP Auto check use crontab

mkdir /app
nano /app/check_connection.sh

<source lang=bash>

  1. !/bin/bash

PATH=$PATH:/sbin

  1. Make sure ppp0 is still up

if [ "`ifconfig | grep ppp0`" == ] then ifdown ppp0

  1. ifup ppp0

poff pon dsl-provider fi </source> Add cron

crontab -e

<source lang=text>

  • /1 * * * * sh /app/check_connection.sh

</source> Restart cron

/etc/init.d/cron restart
crontab -l