Upstart script doesn't start
You can also run init-checkconf
to check syntax
init-checkconf /etc/init/job.conf
File /etc/init/job.conf: syntax ok
It usually means you have an error in the .conf
file - for instance I'm not sure the pid
stanza is supported in 10.04, stop
can't be used in the script etc.
I'd try starting the file from scratch (with only start
, stop
etc), and then slowly building it up by adding more and more lines and testing it via start pure-ftpd
.
For example:
# cat pure-ftpd.conf
start on filesystem
stop on runlevel S
respawn
respawn limit 10 5
# start pure-ftpd
pure-ftpd start/running
# cat pure-ftpd.conf
start on filesystem
stop on runlevel S
respawn
respawn limit 10 5
pid file /var/run/pure-ftpd.pid
# start pure-ftpd
start: Unknown job: pure-ftpd
First, you can check that your job is actually known to upstart:
sudo initctl list | grep your_job_name
...where your_job_name
is the name of your upstart script minus the .conf
extension.
If it's not found, you can try reloading the configuration and then re-checking:
sudo initctl reload-configuration
# re-check
sudo initctl list | grep your_job_name
Then try again to start your job:
sudo start your_job_name
If you weren't getting any logging in /var/log/daemon.log
or /var/log/syslog
before, you might have some now.