Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.

learn more… | top users | synonyms

5
votes
3answers
3k views

Upstart, one job definition to start and one to stop

Hi i just discoverd ubuntu upstart (etc/init/* scripts). And i would like to use it to run a particular application. This app is run via a command line, but there is an argument to start an instance ...
5
votes
2answers
782 views

Upstart not executing the exec function in upstart.conf

I have a completed upstart conf file loaded here: http://pastebin.com/5E7J5jEY but I'm having trouble with the upstart not executing the exec function and/or relinquishing the kernel console CLI back ...
5
votes
3answers
3k views

Best way to make a shutdown hook?

Since Ubuntu relies on upstart for some time now, I would like to use an upstart job to gracefully shutdown certain applications on system shutdown or reboot. It is essential that the system's ...
5
votes
3answers
978 views

How can I replace upstart with systemd?

Since Mark Shuttleworth decided to switch to sytemd in the future, I was wondering if I can install it on my Ubuntu now?
5
votes
3answers
5k views

Auto-start service on bootup that depend on network

I have a particular service (in this case OpenFire) that runs at startup. When it starts, it attempts to connect to a database at a given hostname. At startup time it fails to connect to that ...
5
votes
0answers
30 views

Set permanent command-line options to upstart

I would like to add a command-line option, such as --default-console=none, to upstart. I believe I can just add these to the kernel invocation line and they will be passed on, is this true? If so, ...
4
votes
5answers
19k views

After Upgrading to 12.04 I can't get to the login screen

I cannot go pass the black screen and the following shows up on my screen after upgrading and rebooting with the Ubuntu update manager from 11.10 to 12.04: ata_id [27]: HDIO_GET_IDENTITY failed for ...
4
votes
1answer
132 views

How to specify a daemon shutdown command with upstart?

In an upstart configuration how do I define what command should be used to shutdown a server. Lets say I have daemon that has two seperate processes. startup.sh - to start the server shutdown.sh ...
4
votes
1answer
2k views

How do I choose which way to enable/disable, start/stop, or check the status of a service?

If I want to start a system installed service, I can do: # /etc/init.d/some-svc start # initctl start some-svc # service some-svc start # start some-svc If I want to disable a service from running ...
4
votes
2answers
1k views

How do I run a script once and only once in Upstart?

I have a script that starts on desktop-session-start. The first person who logs in graphically after a boot will have this script called. I want it called once, not every time a person logs in. How ...
4
votes
1answer
1k views

Starting a service from /etc/event.d works, but not from /etc/init

I'm trying to launch an upstart service on Ubuntu 8.04 from /etc/init/, but I always get start: Unknown job: job. When I try to launch this script from /etc/event.d/ it works fine. Why would this be ...
4
votes
1answer
3k views

Why does upstart fail to start my juju service with Unknown job: juju-ubuntu-0?

I'm having issues launching juju on an lxc container through regular juju deploy commands: juju bootstrap juju deploy ubuntu The ubuntu juju status continually says pending. The LXC starts, and I ...
4
votes
1answer
2k views

Upstart conf changes do not reload after edit

After I make some changes to an upstart conf file upstart does not reload the new changes until I reboot the system start on filesystem or runlevel [23] stop on runlevel [6] respawn expect fork ...
4
votes
1answer
1k views

Python service using Upstart on Ubuntu

I want to create to deploy a heartbeat service (a python script) as a service using Upstart. My understanding is that I've to add a /etc/init/myheartbeatservice.conf with the following contents. # ...
4
votes
1answer
10k views

Upstart script and start-stop-daemon

I had an issue where making an upstart script would call the script multiple times, causing my IRCd to spawn around 8 times or so. In order to rectify this, I used start-stop-daemon: description "IRC ...
4
votes
2answers
429 views

A way for an Upstart event to be sent whenever ecryptfs homedir mounted/unmounted?

I have an encrypted homedir (ecryptfs) and I'm wanting to run a private mysql daemon with the database files in my homedir. The daemon should be started whenever the homedir is mounted, and stopped ...
4
votes
1answer
3k views

“respawning too fast, stopped”. How to make UPSTART disable for 5 mins?

In the old days, the init daemon used to disable tasks that were respawning too fast. I discovered to my peril that UPSTART just stops them. forever. I have found the COUNT and INTERVAL controls for ...
4
votes
1answer
174 views

Is upstart a solid replacement for anacron yet?

Upstart FAQ says: Will Upstart replace cron, atd or anacron? Yes. A planned feature for Upstart is the ability to generate events at a particular scheduled time, regular scheduled time or ...
4
votes
2answers
1k views

How I can run ubuntu in chroot on Android?

I want to run fully functional Ubuntu on my Android device in chroot. But I have some trouble with upstart. In chroot "it will actually run /sbin/telinit", so how i can run upstart or replace it with ...
4
votes
1answer
5k views

Upstart is not seeing my new script

I've added a new script to /etc/init/ called minecraft.conf which contains the script: start on startup stop on shutdown respawn respawn limit 20 5 script export HOME="/root" exec ...
4
votes
1answer
1k views

reliably restarting services using upstart or runit

I want to reliably restart my app and web server processes on crash. If I understand correctly, runit starts every service as a child process. If the child process crashes this sends a signal to the ...
4
votes
1answer
104 views

Gnome session log getting too large

Under my user a hidden system folder .cache/upstart/ is getting insanely large - 99G. This is mainly due to a file gnome-session.log. Does anybody know what this folder is and why it may get so large? ...
3
votes
4answers
593 views

How does rc job work / order of (contradicting) “start on …” and “stop on …” stanzas

I just can't understand how Upstart's rc job definition in Natty 11.04 works. To illustrate the problem, here is the definition (empty lines and comments are left out): start on runlevel [0123456] ...
3
votes
2answers
4k views

Running commands on boot in 11.10

So I am getting properly confused on how to create a startup script on my Ubuntu 11.10 server. I have read about init-scripts, upstart-jobs and more, but I get even more confused the more I read. ...
3
votes
2answers
221 views

What happens to manual Upstart services on shut down?

If using the manual keyword in an init or override Upstart script, it is not clear whether the services shut down process will be initiated or it will just be killed on shut down. For instance, will ...
3
votes
1answer
3k views

Expand variables in upstart script

I have written several upstart scripts to start transmission-daemon for several users. The script is this: start on (local-filesystems and net-device-up IFACE=eth0 and runlevel [235]) stop on ...
3
votes
1answer
375 views

Why does mysql process starts on boot?

As you can see, mysql exists only in the /etc/init.d directory and not in /etc/rcN.d, therefore it shouldn't start on boot. $ sudo find /etc -regex ".*\(rc.*d\|init\.d\).*" | sudo grep "mysql" | sort ...
3
votes
2answers
2k views

How to diagnose Upstart errors?

I have an Upstart conf file in /etc/init which starts fine if i start it manually like this: sudo initctl start myconf If i run it without the sudo command i get the error name=(unset) error, which ...
3
votes
1answer
260 views

Simplest way to make a command run after system reboot

I have a server which exists to run one little Django application. If the server reboots, I want Django to start again: nohup /opt/myapp/manage.py runserver ... I'm having trouble finding a simple ...
3
votes
2answers
2k views

How do I setup gunicorn?

Upstart doesn't like to start gunicorn because it tries to call setpgrp (see github issue), what would be the best way to start [gunicorn] on a 10.04.1 server install? - Ideally with automatic ...
3
votes
1answer
2k views

How should I start MongoDB on a NUMA machine?

When I first installed MongoDB 2.2.3 with apt-get, following the instructions from 10gen installation guide, it auto starts when the server starts. However, after following the instructions in ...
3
votes
1answer
3k views

How to Debug when upstart hangs?

I have recently much trouble with services started by upstart. Currently I have problems with avahi-daemon and rsyslogd. Most of the time i had that problem on Ubuntu >= 12.04. What's the problem? If ...
3
votes
2answers
1k views

How To Launch GUI App With Upstart Script

I have a python gtk app I need to run when a user logs in. I can't get upstart to launch any gui app, even if x is running. When I'm signed into X, and I emit the event from the upstart script below ...
3
votes
1answer
901 views

Does Upstart emit hooks for SysV jobs?

I want to make an Upstart job start immediately before a System V job (/etc/rc0.d/S40umountfs). I've tried specifying: start on starting umountfs but Upstart doesn't recognize the name of the ...
3
votes
2answers
1k views

Why is this laptop taking almost 1 minute to boot Ubuntu 13.04?

My dad's new HP Pavilion dv6 laptop running Ubuntu 13.04 takes almost a minute to boot up - it seems like it's hanging somewhere. Is there something I can do to easily fix it? I need some help ...
3
votes
1answer
208 views

.override file isn't working

I have a file /etc/init/boinc-client.override with the single line manual that I use to prevent the BOINC client from starting up. (I don't want it hogging CPU time away from Folding@Home, for now ...
3
votes
2answers
4k views

Starting java processes with Upstart

I want to start a java process using Upstart. Currently, on our OpenSuSE servers, I use the System V init system to achieve this, but on our Ubuntu servers I'd rather use Upstart. But I have two ...
3
votes
2answers
8k views

How can I boot into recovery mode if it hangs booting single user?

How can I boot into recovery mode if it hangs booting into single user mode? I am trying to boot into "recovery mode" or any single user mode, but upstart is trying to start modem-manager no matter ...
3
votes
1answer
800 views

GDM killed on startup

In order to fix a sound issue, I'd completely removed all PulseAudio packages, which removed several additional packages which I hadn't kept track of. I have since added back several packages that ...
3
votes
1answer
1k views

Upstart kill timeout not respected?

I am currently learning upstart by playing around. I think I have understood the principle now, but I am having difficulties with the "kill timeout" stanza in upstart jobs. For example, I have the ...
3
votes
1answer
2k views

How to set up Java-based services for startup?

What's the best way to set up a Java-based program to run an service and start on boot? upstart (pre-start script and post-stop script ?) plain old SysV init? (start-stop-daemon ?) In my case I am ...
3
votes
1answer
278 views

Auto restarting asterisk and mysql using upstart

I want asterisk and mysql to be able to auto-restart if anything were to happen to it, like if it crashed. I found a guide with what I'm looking for, but it's written assuming that the /etc/inittab ...
3
votes
2answers
587 views

How to create (via installer script) a task that will install my bash script so it runs on DE startup?

I've been reading for the last couple hours about Upstart, .xinitrc, .xsessions, rc.local, /etc/init.d/, /etc/xdg/autostart, @reboot in crontab and so many other things that I'm totally confused! ...
3
votes
1answer
215 views

Can I use a custom shell with upstart script stanza?

I'm writing a few daemons implemented in pure shell script and would like to use zsh(powerful substitutions, modules with socket/tcp handling, etc) instead of the default /bin/sh. Can I tell the ...
3
votes
2answers
4k views

How do I change the user Transmission runs under?

I installed Transmission through a PPA and the daemon starts on boot. I want to change the user that runs the daemon because I want the downloaded files to be under the same user as my XBMC ...
3
votes
2answers
1k views

Starting a user-space program as non-root user at boot with upstart

Is there a method to set up an upstart script to execute a user-space program without keeping root privileges, but so the user which has directory/permissions-based ownership of the program can ...
3
votes
2answers
728 views

starting sshd on first connection to port 22 with upstart's new socket bridge

Recent Upstart has these new fancy systemd-like features of starting jobs on incoming connection via socket-bridge. I'd like to start my sshd upon first connection to port 22. I now have: start on ...
3
votes
4answers
3k views

Upstart script for a transmission-daemon executed as a normal user

I have done a script to start transmission-daemon as a normal user: start on filesystem stop on runlevel [!2345] respawn respawn limit 10 5 pre-start script test -x /usr/bin/transmission-daemon ...
3
votes
2answers
196 views

How to keep a graphical application running, even if it crashes?

I use Gnome Do as a launcher for most things. I have it set to run on login and for most of the time it sits in the background waiting for me to mash a keyboard shortcut. About once a week, it falls ...
3
votes
2answers
106 views

Upstart: Run job after networking has finished starting

I'm trying to start an upstart job after making sure networking interfaces are up. This is what I have now: start on started network-interface INTERFACE=eth0 stop on runlevel [!2345] pre-start ...