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

74
votes
8answers
28k views

Running upstart jobs as unprivileged users

What's the canonical way to have an upstart job change its userid and run the script as an unprivileged user? Obviously one can use su or sudo, but this seems hacky (and can generate needless log ...
23
votes
6answers
61k views

How do you disable an upstart service in ubuntu 10.10?

In 10.10 upstart is being used instead of sysvinit. It's possible to remove annoying upstart services which you do not want by removing the appropriate file in /etc/init/blah.conf However, this ...
5
votes
2answers
842 views

Controlling Upstart job as unprivileged user

What's the best way to allow an unprivileged user to control an upstart job? By controlling an upstart job I mean starting/stopping/reloading/restarting it: start myservice I can imagine one way ...
4
votes
1answer
3k views

How to depend on an upstart job from an init script on Ubuntu 12.04

I am using Ubuntu 12.04 LTS and this system uses primarily upstart jobs. Unfortunately my system also depends on a manually compiled dbmail server, which only has a init script, but no upstart script. ...
4
votes
1answer
866 views

Starting Redmine at boot using upstart on Ubuntu

So after installing Redmine from the repositories on Ubuntu 12.04, I've tried to create an upstart script (see below) so it would start up at boot time. While service redmine start does start ...
3
votes
3answers
3k views

Ubuntu, control the init startup

Ubuntu uses upstart instead of sysvinit. However there are still runlevels and the links in them. I have installed tor and it has added itself to the startup of the OS. Now I want to remove it and ...
3
votes
3answers
892 views

How to execute commands as root in git post-receive hook

I just recently set up a remote git repo on a server for a web app running as an Upstart service. I'd like to use the post-receive hook to trigger actions that are required to update the application ...
3
votes
1answer
929 views

Kill Infinite loop at Upstart's run level

One of my applications is at a infinite loop in the runlevel 1 by printing No protocol specified continuously after running startx -- :1. The run level does not listen to my commands given at the run ...
3
votes
1answer
2k views

How to correctly shutdown ubuntu in single-user mode?

I have searched a lot,only to found that many people came across this problem. By adding rw init=/bin/bash to the end of the vmlinuz line,I can enter the single-user mode of UBUNTU 10.04 LTS but,when ...
3
votes
1answer
4k views

How to make PostgreSQL start at boot time in Ubuntu?

Every time I boot my computer, I need to start Posgtres manually via sudo /etc/init.d/postgresql-8.4 start It was an easy task to make it start automatically with Init in place: just add a symlink ...
3
votes
1answer
224 views

Where in CentOS does program start at boot if it's not in init.d?

I have installed a software (GitLab) on CentOS. It works well, but this GitLab starts at boot and I don't want that. So I took a look at /etc/init.d in order to disable it with chkconfig, but my ...
3
votes
1answer
306 views

ubuntu upstart permission error when writing to log on a non admin user

I have a simple upstart script: start on started network-services respawn respawn limit 100 5 setuid www-data exec node /var/testapp/app.js >> /var/log/testapp.log 2>&1 post-start ...
3
votes
0answers
365 views

upstart node.js cant save files, wrong permissions?

I got my own linode server the other day and moved a small nodejs / express I was playing around with over from an aws linux. Everything works great, but if I launch the app with upstart it doesnt run ...
2
votes
2answers
1k views

Autostart SSH tunnels on load (Ubuntu)

Every time I login into my computer I start a SSH connection to a remote computer for database work. How can I automate this in Ubuntu so that I don't have to type this in each time I login to my ...
2
votes
1answer
659 views

Upstart: unrecognized service (CentOS 6.4)

I have created an upstart service from this gist. I put it into: [andrey@vm01 ~]$ ll /etc/init/play.conf -rw-r--r--. 1 root root 1255 Dec 1 20:50 /etc/init/play.conf I also installed upstart, as ...
2
votes
0answers
19 views

Best way to run service no matter the distro

I am working on an application and want to make the script start on boot, and for the users to be able to run things like service my-program restart What i am seeing is there seems to be different ...
2
votes
0answers
66 views

upstart-monitor with CLI option fails to start in Ubuntu Server 13.04

When I try starting upstart-monitor on Ubuntu Server 13.04. I get the following error: Traceback (most recent call last): File "/usr/bin/upstart-monitor", line 195, in <module> class ...
2
votes
2answers
2k views

Automatically mounting Truecrypt volumes at user login time

I need to mount a Truecrypt volume automatically at user login time. This volume is specific for each user. I'm not sure how to proceed since I'm not extremely familiar with Linux and the various ...
2
votes
2answers
434 views

Upstart script for Sphinx

I am trying to get Sphinx running with Upstart on Ubuntu, but the only script I've found isn't working and seems to be more complex than I require. Could someone provide me with a basic Sphinx ...
2
votes
1answer
802 views

Is it safe to remove sysvinit package in Debian sid?

Currently, I have some packages my own using upstart, they are working with the stable branch of Debian. I'm going to switch to sid/unstable, and then the warning comes: WARNING: The following ...
1
vote
2answers
2k views

How to restart a service each hour, in upstart?

I have an upstart service defined as: /etc/init/sshproxy.conf description "Lenik's secret tunnel thru *.ssh.myserver.com" author "谢继雷 (Lenik)" start on (net-device-up IFACE!=lo) stop on ...
1
vote
1answer
2k views

Upstart Help: Change Ubuntu 10.04 Service Boot Order

I am having an issue with the order in which services start up in Ubuntu 10.04. My workstations are configured to use winbind to connect to my Domain Controller for authentication. The problem is ...
1
vote
1answer
1k views

Upstart: Run service as unprivileged user and pre-start script as root

I have following upstart job: description "posty api" start on mysql stop on shutdown env RACK_ENV=production setuid vmail setgid vmail chdir /opt/posty_api pre-start script mkdir -p ...
1
vote
1answer
287 views

Emit upstart events as regular user

I want to create a situation where something unprivileged user does (via SSH) triggers an event that causes an upstart job do perform some action. The activities rely on filesystem changes, so I ...
1
vote
1answer
2k views

How can I write a fail-safe upstart script that starts an application with the necessary permissions?

I'm planning on setting up a server using Ubuntu Lucid Lynx, which uses upstart. I'm not finding the documentation too intuitive, so I'd like to ask for a solution for my specific problem. I'm ...
1
vote
1answer
34 views

Are upstart jobs guaranteed to be given time to run?

I am writing an upstart job that runs a shell script at startup and shutdown which synchronizes some files with a remote machine using rsync. The script can sometimes take a long time to complete if ...
1
vote
1answer
221 views

Upstart: chdir stanza VS cd command

In Upstart script I can use chdir stanza to set the working directory. Also I can just execute a normal cd command inside my script section. What is the difference between this two approaches? When ...
1
vote
1answer
123 views

Upstart and process substitution

So I want to use the following in my script stanza: forever -l >(tee $QW_LOG_DIR/webserver.log | logger -p user.info -t '[QW]') start webserver.js However, that doesn't work for at least two ...
1
vote
1answer
520 views

grep fails in upstart script

I have an upstart configuration for a service which needs to check the existance of a process on it's startup. This sounds fairly easy but I'm already trying for 3 hours to get this thing solved and ...
1
vote
1answer
32 views

Upstart scripts causing problems

I like to start little web servers on boot. I've been using upstart, but often my scripts fail, causing important services like sshd to fail to start. What's a safer way to do this? ...
1
vote
1answer
426 views

Making upstart job redirect output as unprivileged user

I am currently making an upstart job run as an unprivileged user like so: start on started mongodb stop on runlevel [06] respawn respawn limit 10 100 env NODE_ENV=production pre-start script ...
1
vote
1answer
97 views

How can I make my Upstart service depend on PostgreSQL?

I have a service configured as an upstart job. How do I make sure that PostgreSQL is running before my service is started? Ubuntu 14.04 here.
1
vote
1answer
108 views

Upstart script that displays errors to the console?

I have a simple upstart script that runs a process and respawns it if it crashes. The problem is if it crashes I want the user to be alerted that it crashed (because they may need to take an action to ...
1
vote
0answers
1k views

How to troubleshoot Upstart Unknown job error

I set up nginx according to instructions here and it all went well but I am unable to start with $ start <my app name> I created /etc/init/nomilkfor.me.conf (this is the domain name) and this ...
1
vote
1answer
53 views

Upstart start when system is idle

Is there a way to tell upstart to run a job when system is idle? If not, what is the next best thing - i.e. how to start it very late in the process, when system is reasonably expected to be idle?
1
vote
0answers
182 views

How do I run WEBrick as an upstart job?

I need to get WEBrick (basically a Rails web server) to work using upstart, but cannot figure out what should I write in script. The following gives me an error: chdir /rails-app exec su -s /bin/sh ...
1
vote
1answer
107 views

How can I reboot system using Upstart?

I'm using Upstart on Ubuntu 12.04 to control and monitor a service defined by me, where the service is a user process running as a daemon. I need to monitor it so, when it fails/crashes it respawns, ...
1
vote
1answer
508 views

How to change hostname via kernel command line on ubuntu 12

I booted a guest vm on xen, and I want to assign guest-domU's hostname in config file. like this ... extra='ip=::::myguest-vm-hostname::dhcp' ... It is a kernel command line to setting netboot ...
1
vote
0answers
293 views

After installing upstart Raspberrypi gets stuck in boot

I recently installed upstart blindly replacing things I shouldn't of been. The results was that now my raspberry pi is stuck on Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix ...
1
vote
0answers
650 views

Wireless network interface ra0 does not start at boot

I recently installed USB Wireless Adapter based on Ralink RT5370 chip on my Ubuntu 10.04. Manufacturer drivers are installed properly and now I have ra0 wireless interface configured in ...
0
votes
1answer
95 views

Fail to redirect log to /var/log/syslog

I have an upstart script that does the following start on runlevel [2345] stop on runlevel [06] respawn pre-start script exec >/dev/kmsg 2>&1 REPO=git@github.com:blabla/bli ...
0
votes
1answer
59 views

Stopping an upstart script not working

When I try: stop mysite_api, I get: stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.11" (uid=1000 pid=2242 comm="stop mysite_api ") interface="com.ubuntu.Upstart0_6.Job" ...
0
votes
1answer
822 views

Ubuntu: Tomcat upstart script. Logs end up in upstart log

I have a simple upstart script for tomcat. Here is the chef template: description "Tomcat Server" start on runlevel [2345] stop on runlevel [!2345] respawn respawn limit 10 5 # run as non ...
0
votes
1answer
125 views

Upstart event when network connectivity to a specific server is available?

Is there a way in upstart to code an event to start when network connectivity to a specific machine becomes available? Something based on a ping result would work in my case. The task being started ...
0
votes
1answer
417 views

Safely forking a low-privileged child process with su vs. sudo

I am trying to run Node.js as an unprivileged user (dmitry in this case). Hoping someone can confirm or, as necessary, please elaborate upon what I'm seeing below.: Using Ubuntu 12.04 and upstart, I ...
0
votes
2answers
2k views

Trouble using Upstart to launch Redis as redis user

I'm trying to launch redis-server as a user (called redis) via Upstart. My /etc/init/redis-server.conf looks like this: description "redis server" start on runlevel [23] stop on shutdown exec sudo ...
0
votes
2answers
742 views

Upstart: accept user input to switch xorg.conf

I'm trying to get a startup script requiring user input running before gdm starts (the script should allow me to choose from a list of xorg.conf's the one I'd like to use for the current session). ...
0
votes
3answers
1k views

Linux: How to start Skype (or other program) only when I'm online?

I've added Skype to my "Startup applications" list, so that it starts automatically after I log in. (This is on Ubuntu 9.04 Jaunty, with the Gnome desktop) However, I frequently use my laptop ...
0
votes
0answers
20 views

How to start application after login on CentOS? [duplicate]

I am trying to start GUI application with upstart script on CentOS. I have test script located /etc/init/ folder. start on desktop-session-start stop on desktop-shutdown respawn script export ...
0
votes
1answer
38 views

How to start GUI application with upstart?

I have struggled with this problem for three days and I have tried many ways to solve it but not successful yet. I hope you guys can help me... I have an GUI application. I want to start this ...