Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is strange the script use to work fine,but after the proxy went down for a while,it don't work all the time. But the command in script section can still do it's job,and I have no idea what's going on.

description     "Secure Gate Through"

# no start option as you might not want it to auto-start
# This might not be supported - you might need a: start on runlevel [3]
stop on runlevel [!2345]

# if you want it to automatically restart if it crashes, leave the next line in

        plink -v -N proxy@ -D -pw ****
end script

After start,I can see plink in ps -A,but the forwarding don't work at all.

share|improve this question
up vote 2 down vote accepted

Firstly, why do you not have a 'start on' condition specified? Do you really only ever want this service to be started manually?

Second, you can simplify the configuration to be just:

exec plink -v -N proxy@ -D -pw ****

In other words, you don't need 'script' as that just passes the command through the shell. Next, I'd be very wary of hard-coding a password in a job file like this (and IP addresses etc for that matter).

As to what is causing your job to behave strangely, does /var/log/upstart/plink.log give you any indication of the issue?

The Upstart Cookbook provides lots of information you might find useful including:

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.