Shell script to activate OpenVPN
-
hello all,
i wrote a small Shell script to activate and deactivate OpenVpn through IO Device. In my script i have while Loop which looks every 2 Sec the Output of my IO device to activate or deactivate OpenVpn.
It works very good if i execute it manually, but i want to start it by Startup automatically. So i put my script in "/usr/local/etc/rc.d" which will be executed on Startup. But Problem is, it dont work properly correct compare to when i execute it manually. Usually after 3 times activate and deactivating OpenVpn it dosnt work anymore.Anybody knows what the Problem can be?
thanks. -
why would you want/need to do such a thing? Openvpn server or client if enabled would autostart by default.
-
thanks for reply,
but that's what we need to do, we want to activate or deactivate our VPN Client anytime just by pressing a Switch.
but ist not my Problem, it works if i execute script manually, as i said it works strange when i put the script in /usr/local/etc/rc.d to execute on Startup.