Questions specific to Ubuntu's "upstart" init system. Do not use for general init issues.

learn more… | top users | synonyms

67
votes
4answers
29k views

What are the pros/cons of Upstart and systemd?

It appears systemd is the hot new init system on the block, same as Upstart was a few years ago. What are the pros/cons for each? Also, how does each compare to other init systems?
19
votes
2answers
9k views

Upstart on Debian?

I created an upstart script in Ubuntu, thinking it would be the same for Debian. But Debian doesn't have a /etc/init folder that Ubuntu has. I went to the upstart download page and seeing that they ...
16
votes
6answers
27k views

Ubuntu12.04: How to disable a daemon process at startup

I normally use service start/stop or initctl start/stop to start or stop a daemon process but now what I am looking for is to disable a daemon process from starting at startup example mysqld. ...
10
votes
1answer
2k views

is upstart and supervisord used for the same thing?

I have a some jvm based processes that I need to make sure start whenever my server is rebooted, and also if it stops because of an unexpected error etc. I'm running Ubuntu 12.04 in case in matters. ...
9
votes
4answers
7k views

Why doesn't docker container start at boot w/ upstart script on Ubuntu 12.04?

Using instructions for Docker auto-start on Linode VPS running Ubuntu 12.04 and Docker 0.8.1, the specified container does not start on reboot. Once booted, I am able to ~$ sudo start [service-name] ...
8
votes
1answer
9k views

How can I restart the SSH daemon on Ubuntu?

When I type in service sshd restart I get a sshd: unrecognized service error. I do have, in /etc/ssh/ a file sshd_config that I use to set config. I can also putty into the Ubuntu box (it is remote). ...
7
votes
2answers
20k views

How to start a service automatically, when Ubuntu starts?

I am using Ubuntu 12.04 and want to have a service starting, when the system is booted normally. As 'service' I understand some code, for example cd my_directory; my_command -host 0.0.0.0 -port ...
7
votes
0answers
835 views

Solaris SMF vs Linux Upstart [closed]

I'm in the process of learning Upstart after first having learned SMF. Naturally I'm assuming that they fulfill the same purpose but I'm aware that this is where I'm wrong. Ideally I was hoping ...
5
votes
1answer
3k views

Disable atd (and other unnecessary startup processes) in Ubuntu?

I just spun up a new 12.04 server and have been having a bit of trouble getting the atd daemon to stop auto-launching. There's been a bit of changing around on the management of startup processes, ...
5
votes
2answers
4k views

Running a bash script as a less privileged user with upstart

This is the script, /home/jack/myscript.sh, which I want to run: export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26/ /home/jack/myapp/apache-tomcat-6.0.32/bin/./catalina.sh run The upstart file, ...
5
votes
1answer
54 views

Upstart and bash function names containing “-”

I inherited some bash scripts where the author used "-" in the function names instead of the more normal "_" e.g.: function a-b { ... } Ugly but legal in bash. Problem is I sourced this inside an ...
4
votes
5answers
293 views

How to disable graphical shell?

I have a Linux system (Ubuntu) running in a VM, but now I want to disable the graphical shell. Where in the startup process are the graphical components launched? Is it some run-level dependent ...
4
votes
3answers
5k views

Is it possible to export env variable via Upstart?

I need to export a variable FOO=stringhere so that system processes could use it. And the place I would like to do this, is Upstart job. Unfortunately, I tried as per Upstart manual to do env ...
4
votes
2answers
5k views

What's the status of Upstart on Debian? [closed]

I know that this question has already got asked before, but it's pretty old and things have changed (probably). Already in 2009 the news rumbled, that Debian was going to switch to Upstart. You were ...
4
votes
2answers
87 views

Trigger an init script when a specific device is up and a kernel module has been loaded

On my ubuntu 12.04 servers, I need to write an init.d script that waits until the infiniband interface (device: mlx4_0, interface: ib0) is completely up, and until the knem kernel module is loaded. ...
4
votes
2answers
226 views

Upstart - when a given event occurs, in what order are the jobs run?

I am using Ubuntu 10.04.3, and am using upstart as the init daemon (pretty sure this is the default). When a given event occurs, in what order are the jobs run? Specifically, I'm referring to jobs ...
3
votes
2answers
1k views

Chkconfig on Linux Mint 12 giving tons of errors

I'm trying to disable some services from starting at boot time on my Linux Mint 12 laptop. So I installed chkconfig, which has worked great for me before on Fedora. However, on Linux Mint 12, it gives ...
3
votes
1answer
508 views

How to keep upstart installed-always, don't be replaced by sysvinit?

Each time I do apt-get dist-upgrade, the package sysvinit comes back and replaced upstart. Well, I have some scripts written for upstart, and I need to reinstall it every time (typing the annoying ...
3
votes
3answers
998 views

linux launch script /etc/init with a specific user

I've created a script in /etc/init/mms-agent.conf : start on runlevel [2345] stop on runlevel [06] exec /usr/bin/env python /home/mms/mms-agent/agent.py >> /home/mms/agent.log 2>&1 ...
3
votes
2answers
246 views

How to disable a daemon process on RHEL 6.3 like SMF does on Solaris

This problem has been bugging me for a while, we have a program running on Solaris, which managed as a service well by SMF, can be enabled/disabled very easily. Now, according to our market, we would ...
3
votes
2answers
164 views

Silencing all stdout during bootup

I am looking for a completely silent bootup of my Ubuntu Server 13.04 installation (dumped to file rather than stdout). What I want is the screen to be blacked out (eventually replaced with a logo) ...
3
votes
1answer
641 views

Passing in parameters to Upstart

I can do mongod -f /etc/mongodb.conf How do I achieve the same effect when starting mongodb as a service? ie sudo service start mongodb By default this does not read from the config file. I ...
3
votes
2answers
721 views

Why are there both, an Upstart script and an init.d script, for several daemons? [closed]

I am running Ubuntu 12.04.3 LTS and installed several services like Samba, DHCP server, ... I receive the following warning when I run "halt now", "telinit 6" or similar: Since the script you are ...
3
votes
3answers
492 views

Upstart: How to run a “stop” before stopping other services?

I recently found out about the upstart "service starter" that Ubuntu is using and that is (apparently) the future to start/stop jobs in Linux. It's pretty new to me (I was used to the old SysV system ...
3
votes
0answers
465 views

The equivalent of start-stop-daemon for RedHat 6

I have an upstart script to create a service in RedHat 6: env PLAY_BINARY=/usr/bin/play env HOME=/opt/warda env USER=root env GROUP=root [...] script exec start-stop-daemon --start --exec ...
3
votes
3answers
459 views

How do I start a screen session using an upstart job with a non privileged user?

I have struggled with this problem for two days and have tried many things to fix it to no avail. I'm hoping you guys can help me out. I am trying to create an Upstart job that starts a new screen ...
3
votes
0answers
177 views

Upstart reload does not work

On a virtualised Ubuntu, I used the command $ foreman export upstart /etc/init -f Procfile -e conf/development.env -u ubuntu -a my_app -t upstart And can now start my_app using $ sudo start my_app ...
2
votes
2answers
1k views

How to test UPSTART feature of ubuntu to see my script gets restarted automatically if it gets killed?

I am running my Python script using upstart feature of Ubuntu so that if for whatever reason my Python script dies or gets killed, it can be restarted automatically. So I decided to use UPSTART ...
2
votes
1answer
92 views

How does `shutdown -k` disable logins?

This is the -k option's documentation in man shutdown (at least on Ubuntu): -k Only send out the warning messages and disable logins, do not actually bring the system down. I initially ...
2
votes
2answers
167 views

How to associate a script at boot time to a specific run level?

I am trying to understand how run levels work. I understand the meaning of the 7 run levels and I understand that they were usually configured by /etc/inittab, which used to call /etc/init.d/rc, which ...
2
votes
1answer
83 views

Running services without sudo

I want to run a nodeJS web server on a couple of machines which I don't have sudo access on. What would be a good way to do this? The two requirements are: running the service without being ...
2
votes
1answer
121 views

Upstart - setuid inside post-start stanza

I have this upstart script that looks a bit like this: setuid userA setgid userB script # ... bunch of stuff run as userA end script post-start script # ... command run as userA # ... ...
2
votes
1answer
3k views

Upstart documentation for CentOS 6

I am currently migrating from CentOS 5.5 to 6.4. Having fun converting /etc/inittab stuff to upstart. Ran into a lot of little problems but am getting the hang of it now. The best documentation ...
2
votes
1answer
2k views

service to start on boot doesn't work with update-rc.d comand

I have installed redis server on my ubuntu based server, so I can start/stop/restart redis server, the redis_server.sh is already in the /etc/init.d. Now I want to make redis start on boot, I ...
2
votes
1answer
44 views

Ubuntu init script failed - trying to find out more detail about the error

My /var/log/boot.log shows this under Ubuntu 14.04: ... * Starting servicename <br> chown: invalid user: ‘username’<br> No passwd entry for user 'username'<br> * Starting ...
2
votes
3answers
203 views

Upstart - load bashrc variable

I'm wondering how to load bashrc variables in an upstart script and run (node.js in that case server). What is the best way to do it? I tried this: exec sudo -u someuser $NODE_PATH ...
2
votes
4answers
203 views

How to restart python script after one second of going down using UPSTART?

I am running my Python script using upstart feature of Ubuntu so that if for whatever reason my Python script dies or gets killed, it can be restarted automatically and everything is working fine - ...
2
votes
0answers
333 views

exit code of grep in trap where the script is launched by upstart service

recently I encountered a problem in ubuntu upstart and trap in bash shell. I use ubuntu 12.04 the upstart script(/etc/init/player.conf) is: start on (local-filesystems and runlevel [2345]) stop on ...
2
votes
1answer
97 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 ...
2
votes
0answers
24 views

How to create an upstart process in Ubuntu? [duplicate]

I am trying to create a process to be automatically started and maintained by Ubuntu's upstart (Ubuntu 12.04). I have been looking at this page as well as on this page and I am aware of the upstart ...
1
vote
2answers
4k views

Changing user in a script?

I am trying to change user in order to execute a specific command during startup. It fails silently and apparently the userchange isn't carried out as I can tell that the command isn't executed. What ...
1
vote
1answer
90 views

Identify if server boots using upstart or sysvinit

I am a not a experienced linux user/admin, but last week I acquired a raspberry, and installed on it a Raspbmc, based on Debian distro. I am having some troubles trying to identify which scripts the ...
1
vote
2answers
245 views

Replacing Upstart with Sysvinit in Wheezy results in error

I have a Debian Wheezy server with upstart installed. I removed upstart and replaced it with sysvinit, which resulted in the following error: apt-get install --reinstall sysvinit Reading package ...
1
vote
3answers
347 views

Send a command with password in upstart script

CentOS 6.5 The server is an AWS AMI, specifically this one I'm trying to use upstart to start a process on boot On this particular box, the root login is disabled, and every time I need to run ...
1
vote
2answers
51 views

Can't get upstart service to honor capabilities(7)

I am developing a daemon started by upstart (Ubuntu 14.04) which needs to run as a non-privileged user (for security), but bind privileged port 443. I am using setcap to set the CAP_NET_BIND_SERVICE ...
1
vote
2answers
144 views

Upstart: launching something only once

Fact: If you use start on <event> for a job, your job might be run every time <event> occurs. The upstart cookbook mentions two methods to run a job only once. The first is logical to me, ...
1
vote
1answer
196 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 ...
1
vote
1answer
277 views

upstart writing to syslog in a simple way

I have an upstart script that uses pre-start script exec >/dev/kmsg 2>&1 echo starting program # run my program here npm install node app.js end script to redirect output of a ...
1
vote
1answer
47 views

upstart script that runs another script, constantly launching

I have an expect script named ex.sh that interacts with another script 'vpn.sh'. the vpn.sh script runs a vpn client so I need Upstart to automatically start it when my server reboots. Currently I ...
1
vote
1answer
1k views

Daemon - how to tell the start daemon to execute this daemon as different username than root?

I have this startup script, when i launch i have the execution done by username: root, instead of username: sun. How can i tell the start_daemon to execute it as username : sun not root? $ ps aux | ...