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

24
votes
2answers
2k views

Can upstart handle symbolic links to config files?

I have all of my upstart config files under version control. My ideal way to use upstart is to create soft links from my version control repository (mercurial - not that it matters) into /etc/init but ...
18
votes
6answers
11k views

Logging a Daemon's Output with Upstart

I have a custom daemon that is managed by upstart on my Ubuntu server. It works perfectly except that I need to capture (log) the daemon's output. The official stanzas page says that I can use console ...
16
votes
4answers
1k views

How to make upstart back off, rather than give up

I want Upstart to do two things: stop trying to respawn a failed process so fast never give up trying to respawn In an ideal world, upstart would try to restart a dead process after 1s, then ...
15
votes
4answers
18k views

upstart scripts: run a task after networking goes up

I'm working on moving my current server setup to newer hardware, and migrating from ubuntu karmic koala to lucid lynx. Currently i'm using gw6c (compiled from the gogo6 website, as opposed to the ...
14
votes
3answers
15k views

CentOS 6 and upstart

The new CentOS 6 comes with Upstart, replacing init. I am trying to convert an /etc/inittab file to the new upstart format. This particular server only has 15 or so inittab entries, however, other ...
11
votes
3answers
13k views

Is there a “standard” way to make daemon in Debian?

I need to create a daemon from the application in Debian. Is there any standard tool for this in Debian like "upstart" in Ubuntu? I need only start-stop commands, to start a program as a daemon with ...
11
votes
2answers
3k views

Have upstart read environment from /etc/environment for a service

What is the best way to provide the environment variables defined in /etc/environment to an upstart service? I think simply sourcing them with . in a script section does not work, because the ...
9
votes
1answer
6k views

Upstart: allowing a normal user to stop and start my custom service

I have got my webserver application starting on boot using upstart. This is the upstart script: # web app node upstart file at /etc/init/webapp.conf description "web application" start on started ...
8
votes
7answers
12k views

How can I start nginx via upstart?

Background: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS" I've built nginx, and I'd like to use upstart to start it: nginx upstart script ...
8
votes
1answer
8k views

upstart does not see my job

in Ubuntu 12.10 user@xyz:~$ sudo initctl --version initctl (upstart 1.5) Copyright (C) 2012 Scott James Remnant, Canonical Ltd. This is free software; see the source for copying conditions. There ...
7
votes
1answer
3k views

Using Upstart to Manage AutoSSH Reverse Tunnel

I'm using upstart to manage a reverse SSH tunnel via autossh. When I do a "sudo start tunnel" the connection comes up just fine; however the command is not being automatically run when the networking ...
7
votes
2answers
3k views

Upstart : start service after non-upstart process

On Ubuntu 10.04, I need to start my service with upstart, but only when mysql is up and running. The problem is that mysql itself is not handled by upstart, so I can't use the "start on" feature. ...
7
votes
2answers
3k views

How to define different stop/restart signals with upstart

I am starting to convert all of our systems to using upstart to manage our various application processes. One thing that I am constantly missing is the ability to send a different signal to the ...
6
votes
1answer
3k views

What signal does upstart/initctl use to restart a job?

What signal will upstart/initctl use to restart a job? Furthermore, is there any way to specify that SIGHUP should be used? Alternately, is there a way to define a custom reload command that will ...
6
votes
1answer
2k views

Equivalent for the “pid file” stanza in newer versions of upstart

I'd like to be able to use upstart to manage daemons where I don't have complete control over the forking behaviour. The "pid" stanza is removed as of version 0.3.9, so I can't point it at a pid file. ...
5
votes
1answer
1k views

Upstart vs Supervisord to manage WSGI processes

Thoughts? I'm running Ubuntu 10.0.4
5
votes
3answers
4k views

How to start a rake task using upstart

I'm trying to setup a Resque worker as an Upstart init script to be used by Monit in a Rails app. I'm not a sysop and I've tried to write this using examples from other init script we have on our ...
5
votes
2answers
1k views

Cannot find upstart logs in syslog despite a log-priority of debug (ubuntu 13.04 & mint 16)

I've set upstart log level to "debug" sudo initctl log-priority debug But I still cannot see anything in /var/log/syslog. sudo initctl emit hello # no log sudo initctl start my-broken-service # ...
5
votes
2answers
4k views

Running Upstart user jobs on startup

I am running Ubuntu server 11.04. I have created an Upstart user job as described here. I have the following file at my /home/myuser/.init/sensors.conf: start on started mysql stop on stopping mysql ...
5
votes
3answers
3k views

Ubuntu Upstart script hangs on start and stop

I have an upstart script that will start a custom jetty server. When I do sudo start [myservice] nothing happens. Subsequently, sudo status [myservice] show it as: [myservice] start/killed, process ...
5
votes
3answers
1k views

chkconfig equivalent for upstart jobs on CentOS6

On RHEL6/CentOS6 what is the upstart way to: chkconfig add my-svc chkconfig my-svc on Explanation: I have written an /etc/init/xvc0.conf job. I can do start xvc0 on the CLI, but after reboot ...
4
votes
3answers
4k views

Using Upstart to manage Unicorn w/ rbenv + bundler binstubs w/ ruby-local-exec shebang

Alright, this is melting my brain. It might have something to do with the fact that I don't understand Upstart as well as I should. Sorry in advance for the long question. I'm trying to use Upstart ...
4
votes
2answers
2k views

cant get upstart script for node.js program to start on startup

I made a rather simple startup script for my node.js program that should run on startup: start on startup stop on shutdown script exec sudo -u max WEBSITES_DIR=/home/max/websites/ ...
4
votes
2answers
2k views

Ubuntu Upstart Error

I'm running Ubuntu 10.04 LTS and attempting to run services via start,stop, status and I get the corresponding error below. I've googled around but everything is like 2-3 years old and unanswered. ...
4
votes
1answer
628 views

Is there a timeout for init.d scripts running during boot process?

I am creating a few scripts that are being registered to execute on server start on CentOS 6.5. One of this scripts has a while loop that blocks until it finds a successful start message on the log ...
4
votes
1answer
3k views

Simple upstart script for nodejs + forever on Ubuntu

I'm using Ubuntu Sever 12.04. I have a nodejs application which I want to run like so: NODE_ENV=production PORT=3001 APP_PATH=/var/www/myapp forever -a -l /var/www/myapp/forever.log -o ...
4
votes
1answer
139 views

How to prevent a service from starting until a volume is mounted?

Using Ubuntu 12.04 or 14.04, how can I prevent an upstart service from starting until a couple of network volumes (GlusterFS) get successfully mounted?
4
votes
1answer
2k views

Upstart: stop on runlevel [016] vs stop on starting rc RUNLEVEL=[016]

So, I'm working on an upstart init script for mysql. Should be trivial, right? My stop stanza looks like: kill timeout 30 stop on runlevel [016] I shutdown now -r, and mysql yells about my MyISAM ...
4
votes
1answer
2k views

sleep in upstart script (upstart synchronism)

I've written this code to automatically start KVM Virtual Machine at boot of host system, and stop Virtual Machine at shutdown or reboot of host system. start on startup start on started networking ...
4
votes
1answer
495 views

Pre-populate vagrant synced folder contents

I'm currently building an rather complicated server stack (a ruby on rails app) that I want developers to be able to work on without having to install everything themselves. Therefore I use Vagrant to ...
3
votes
3answers
2k views

Comprehensive guide to init.d scripts?

I'm looking for good resources to learn more about how to write/debug/maintain init.d scripts on Ubuntu. Do you have any links or books to recommend ?
3
votes
1answer
2k views

Upstart does not work

I followed this tutorial to set up upstart for my node.js server: http://howtonode.org/deploying-node-upstart-monit The problem is, that when I try to run "start mynodeprogram", I get the floowing ...
3
votes
1answer
319 views

Upstart: Why two processes when running as a different user?

I want to keep a nodejs app running, so I followed this: http://howtonode.org/deploying-node-upstart-monit and installed Monit and Upstart which have been working perfectly for a couple of months. I ...
3
votes
1answer
727 views

Daemon dies but upstart thinks it is still running

If the daemon process dies, I'm unable to restart it manually: start foo results in a message that "start: Job is already running: foo", and stop foo hangs indefinitely. start on runlevel [2345] stop ...
3
votes
1answer
933 views

restarting php5-fpm on ubuntu 14.04 with chef

I have this in my chef recipe: service 'php5-fpm' do supports :restart => true action [ :enable, :start ] end However my recipe now barfs in Ubuntu 14.04, as "/etc/init.d/php5-fpm restart" ...
3
votes
2answers
602 views

High CPU usage with wineconsole running in background

I have a (pretty simple) Windows console application which I want to run on a Linux server using Wine. When I just run it from the terminal over SSH like wine myapp.exe everything works great. It ...
3
votes
3answers
1k views

Upstart Job as Unprivileged user fails with permission denied

I'm trying to set up a Sage Cell Server (an open source mathematical engine) running as an unprivileged user. I've created the unprivileged user sagecell to do the job. It is installed correctly and, ...
3
votes
2answers
374 views

Spawning multiple instances of a daemon in Ubuntu

I have a python script that listens and blocks while it waits for data on a redis list. It runs fine in upstart using the following: description "stage message consumer" author "Nilesh Ashra" start ...
3
votes
2answers
713 views

Debain no longer booting after apt-get remove upstart

I can no longer boot my server up. I get the following issue: Loading, please wait... Target filesystem doesn't have requested /sbin/init. /bin/sh: can't access tty; job control turned off # _ and ...
3
votes
2answers
1k views

How can I receive an email when an upstart monitored script respawns?

My upstart config looks something like this start on filesystem stop on runlevel S respawn exec /path/to/my/script When this script dies and is respawned I would like to receive an email. Is this ...
3
votes
2answers
1k views

Upstart multiple instances of service not working

I started playing with MongoDB on Lucid. Now I would like to run a DB and Config server on the same box. They both use the same binary to launch, but with different config files and running on ...
3
votes
3answers
1k views

upstart not working

I saved the following file at /etc/init/nodejs.conf description "node.js server" author "dorelal" start on startup stop on shutdown script # We found $HOME is needed. Without it, we ran ...
3
votes
1answer
293 views

Why is upstart eating all of my RAM?

I'm running Ubuntu Server 12.04 LTS in EC2. I have several node.js daemons running as services under upstart, along with the usual init stuff. After every deploy, during which all the node.js daemons ...
3
votes
2answers
147 views

Is it possible to set an Upstart service to stop $LAST

I'm wanting the rsyslog service to run until the last moment to ensure we receive as much logging as possible on our central logging servers. On Ubuntu 11.04, rsyslog's stop line is set to "stop on ...
3
votes
2answers
1k views

Fedora14 serial console how-to needed

Has anyone ever got a serial console working in fedora 14 ? Is it as simple as adding to grub: serial --unit=0 --speed=38400 terminal --timeout=10 serial console and add to the kernel lines: ...
3
votes
1answer
158 views

Properly ordering shutdown of MySQL and iSCSI on Ubuntu Lucid

I'm running MySQL on an Ubuntu 10.04 server, with the MySQL $datadir located on an iSCSI volume. The filesystem is tagged with "_netdev" in /etc/fstab. On system shutdown, upstart sends MySQL a ...
3
votes
2answers
180 views

Why can't I run this python script as a job in ubuntu 12.04?

Normally I do this: cd /home/ubuntu/project/beta python default.py -dev In order to start the web.py server I would prefer to do this: sudo start beta Here is my /etc/init/beta.conf setuid ...
3
votes
1answer
1k views

Upstart won't reload it's configuration

I have a service I'm trying to write an upstart script for and it's not going too well. At some point, I decided I needed a fresh start and removed the upstart configuration file. stop myservice rm ...
3
votes
0answers
197 views

Monit will not start my node js app

I have a problem with Monit that I use for monitoring of my Node.js app. I just moved from a single core machine to a multi core one. On both of them I run Ubuntu 11.10. On the old one this was ...
3
votes
1answer
751 views

Writing an upstart config file for Unicorn

I've had a good hunt and can't find a good example of an upstart script for Unicorn. From what I've read however I think that upstart and unicorn might step on each others toes if I just try to set ...