#!/bin/sh
##
#
# файл
ppp-off
# Определяем какое устройство у нас есть ppp0 или ppp1
# по default'у это ppp0 иначе вводишь рядом с командой
# ./redialer ppp1 пример
#
if [ "$1" = "" ]; then
else
fi
##
#
# If the ppp0 pid file is present then the program is running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
kill -INT `cat /var/run/$DEVICE.pid`
#
# If the kill did not work then there is no process running for this
# pid. It may also mean that the lock file will be left. You may wish
# to delete the lock file at the same time.
if [ ! "$?" = 0 ]; then
rm -f /var/run/$DEVICE.pid
echo ERROR: Removed stale pid file
exit 1
fi
#
# Success. Let pppd clean up its own junk.
fi
#
# The ppp process is not running for ppp0
echo «ERROR: PPP link is not active on $DEVICE»
exit 1
#
Чего-то я подумал и решил, что тут все понятно.