I'm trying to setup deluged to run after OpenVPN makes a connection to my VPN. From researching, it looks like there isn't a reliable "start on" status with openvpn, so the next solution is to put the startup directly into the .conf file for the OpenVPN connection.
I've followed How do I run a script after OpenVPN has connected successfully? trying to initialize the server after OpenVPN connects, but so far, nothing has worked.
my openvpn.conf file is as follows
client dev tun proto udp remote 22.214.171.124 443 remote-random resolv-retry infinite nobind ns-cert-type server cipher AES-256-CBC comp-lzo verb 3 explicit-exit-notify 5 ca "ca.crt" cert "user.crt" key "user.key"
at the bottom, I've tried the following
script-security 2 up /usr/sbin/service deluged start down /usr/sbin/service deluged stop
I've also tried
script-security 2 up "/usr/sbin/service deluged start" down "/usr/sbin/service deluged stop"
but both times, if I cycle the openvpn connection, the deluged service fails to start. I can run
service deluged start/stop from prompt directly, and it runs fine
What am I missing?
(Running Ubuntu 12.10)