Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

dev tun
proto udp
remote 443
resolv-retry infinite
ns-cert-type server
cipher AES-256-CBC
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)

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.