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

I don't understant why my script is not running. Here is what I did (I'm using Ubuntu 10.04).

I wrote a mountFTP.conf script:

description     "Mount the remote FTP for sync"

start on started tty1

curlftpfs ftp://admin:123456@ /FTP/
end script

I saved the script in /etc/init/ folder. If I use the command "service mountFTP start" it works, but it doesn't want to automatically start on boot...

I also tried with "strat on stratup" with no luck. I also added some log to the script to check if it is executed or not, and it is not executed at all.

share|improve this question
Is tty1 started already? Try to place some logging in your script to see what happens... – Frantique Nov 15 '12 at 14:18
I suppose you did type "start on startup" instead of "strat on stratup" ? – Nanne Nov 15 '12 at 14:28
Probably that he did not linked the upstart-job to his script. See my answer. – Frantique Nov 15 '12 at 14:33

Follow these steps:

sudo chown root:root yourscript.conf  
sudo chmod 644 yourscript.conf  
sudo mv yourscript.conf /etc/init  
cd /etc/init.d  
sudo ln -s /lib/init/upstart-job yourscript  
share|improve this answer
Thanks, I thought it would start after the tty1 service. So I tried with "start on runlevel [2345]" but it still wont start – lucas Nov 15 '12 at 14:47
Yes it was "start on startup" in my script. I check the owner and permission on my script and it was already ok. I also tried to add the symlink in init.d but it doesn't help. Really strange – lucas Nov 15 '12 at 15:04
Ok I finally found the solution! I used the following line in my script: "start on (local-filesystems and net-device-up IFACE=eth1)" I still don't know why the "start on runlevel [2345]" didn't worked.. Thanks Frantique for your help ! – lucas Nov 15 '12 at 15:40
I get an error: failed to create symbolic link /etc/init/mysript.conf file exists – Igor G. Jul 18 at 2:52

It looks like the version of Upstart that @Frantique mentions is only available in the latest (13.10) version of Ubuntu. Most of my stuff is older than that.

Another alternative is to pipe your output to 'logger'.

Try something like:

description     "Mount the remote FTP for sync"

start on started tty1

curlftpfs ftp://admin:123456@ /FTP/ | logger
end script
share|improve this answer
I don't understand what this should solve. It doesn't work. – Igor G. Jul 18 at 2:55
The 'logger' command writes data received on STDIN to the syslog. You can verify that logger is installed by running 'which logger'. If it returns a path (like /usr/bin/logger), you have it. If not, you will need to install it. – Aaron C. de Bruyn Jul 20 at 23:15

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.