Openvpn and shell script
Posted: Thu Nov 18, 2010 11:41 am
Hi,
I need to create a script (on a linux environment) that does:
- launch the openvpn client up (openvpn remote_factory.ovpn);
- when the openvpn is up, execute a script on the local server that brings some datas on the "ovpnenned" remote server (/bin/sh somescript.sh);
- when the execution og the script is finished, stop the ovpn (thought killall openvpn or something better).
I tryed ti find informations almost everywere, probably someone did it but I can't find infos.
I also know I can do all with a coule of scripts and semaphore technics, but if I can do this more simple is better than playing with files...
Thanks for everyone that can help on it!
REgards,
JS
I need to create a script (on a linux environment) that does:
- launch the openvpn client up (openvpn remote_factory.ovpn);
- when the openvpn is up, execute a script on the local server that brings some datas on the "ovpnenned" remote server (/bin/sh somescript.sh);
- when the execution og the script is finished, stop the ovpn (thought killall openvpn or something better).
I tryed ti find informations almost everywere, probably someone did it but I can't find infos.
I also know I can do all with a coule of scripts and semaphore technics, but if I can do this more simple is better than playing with files...
Thanks for everyone that can help on it!
REgards,
JS