daily pastebin goal
42%
SHARE
TWEET

ppp-off

tolikpunkoff Feb 27th, 2015 216 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. ###################################
  3. #
  4. # ppp-off
  5. #                        
  6. #  Linux PPP HOWTO
  7. # Robert Hart  31.03.1997
  8. # Translated by Ilgiz Kalmetev
  9. #
  10. # Opredelit preryvaemoe ustroistvo
  11. #
  12. if [ "$1" = "" ]; then
  13.    DEVICE=ppp0
  14. else
  15.    DEVICE=$1
  16. fi
  17.  
  18. ####################################
  19. #
  20. # Esly pid-file ppp() yest, togda programma rabotaet.
  21. # Ostanovit ee.
  22. if [ -e /var/run/$DEVICE.pid ]; then
  23.    kill `cat /var/run/$DEVICE.pid`
  24.    echo "OK"
  25. #
  26. # Esly kill ne rabotaet, togda net processa,
  27. # zapushennogo pod etim pid.
  28. # ili sushestvuet postoronnii lock-file.
  29. # popytka ego udalit
  30.    if [ ! "$?" = "0" ]; then
  31.       rm -f /var/run/$DEVICE.pid
  32.       echo "ERROR: Removed stale pid file."
  33.       exit 1
  34.    fi
  35. #
  36. # Otlichno. Pust pppd popravit svoi nedo4et.
  37.    echo "PPP link to $DEVICE terminated."
  38.    exit 0
  39. fi
  40. #
  41. # ppp process ne zapushen dlya ppp()
  42. echo "ERROR: PPP link is not active on $DEVICE"
  43. exit 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top