Thank you very much mchaley. But my system a little bir complicated. I use too much services and it effects each other. dnsmasq and ubound services has special config files. I changed my scripts a little bit. Now it works perfectly. I fixed my problem. My latest fix bold values:
vpn-pass.sh file it runs every hour:
Quote:
#!/bin/bash
#
######################################################################
#
# vpn-pass.sh @ VERSION 1.1
#
# VPNBook Password Updater by Kaan Dogan
#
######################################################################
I changed my system a little bit. Because if VPN down I can ping thru my WAN. Instead of heavy pings I simplified my code. Every hour vpn-pass.sh checks vpnbook password. If it was changed, it will change on router and reboot. If the VPN password didn't change, it starts custom.sh. It checks the traceroute result. I know my VPN gateway is 10.10.0.1 works perfectly.
vpn-pass.sh file it runs every hour:
Quote:
#!/bin/bash
#
######################################################################
#
# vpn-pass.sh @ VERSION 1.2
#
# VPNBook Password Updater by Kaan Dogan
#
######################################################################