I would like to run a script after OpenVPN made a connection to a server and if that script was executed successfully Transmission (torrent client) has to be started. But I have the following problem.
OpenVPN and Transmission are currently being executed by rc.conf and the script gets executed by cron at 60s after rebooting. That kinda works but sometimes the connection is not made and the script fails.
Now I'm not sure how to make a service wait until a cron job was executed successfully and how I could execute a cron job only if the OpenVPN connection was made. Is there a simple solution to this problem?
OpenVPN and Transmission are currently being executed by rc.conf and the script gets executed by cron at 60s after rebooting. That kinda works but sometimes the connection is not made and the script fails.
Now I'm not sure how to make a service wait until a cron job was executed successfully and how I could execute a cron job only if the OpenVPN connection was made. Is there a simple solution to this problem?