SHARE
TWEET

Untitled

a guest May 22nd, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. RET=$(/sbin/ifconfig | /bin/grep -c tun0)
  3. if [ $RET -ne "1" ];then
  4.         /etc/init.d/openvpn restart
  5.         echo `date` "vpn started" >> /root/vpn_ratbv.log
  6.         sleep 5
  7.         /root/fw.sh
  8.         echo `date` "fw started" >> /root/vpn_ratbv.log
  9. else if eval "ping -c 4 -f -i 0.2 192.168.3.10 >/dev/null"; then
  10.         echo E DE BINE >/dev/null
  11. else
  12.         /etc/init.d/openvpn restart
  13.         echo `date` "vpn started" >> /root/vpn_ratbv.log
  14.         sleep 5
  15.         /root/fw.sh
  16.         echo `date` "fw started" >> /root/vpn_ratbv.log
  17. fi
  18. fi
  19. exit 0
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top