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

client
dev tun
proto udp
remote 108.59.8.142 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)

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.