upstart

How do I add another run level (level 7) in Ubuntu?

Ubuntu has 8 run levels (0-6 and S), I want to add the run level 7. I have done the following: 1.- Created the folder /etc/rc7.d/, which contains some symbolic links to /etc/init.d/ 2.- Created the file /etc/event.d/rc7 This is its content: # rc7 - runlevel 7 compatibility # # This task runs the old sysv-rc runlevel 7 ("multi-user") ...

Upstart calling script (for inserted USB-drive)

Hi, I know that Ubuntu (and Fedora) uses Upstart istead of the classical System V init daemon (SysVinit). I would like to know how to detect when a USB-drive has been inserted, mount it and copy some files to it. I would like Upstart to call my own script for this. If it is possible I would like Upstart to call the script for a specifi...

flush output in Bourne Shell

I use echo in Upstart scripts to log things: script echo "main: some data" >> log end script post-start script echo "post-start: another data" >> log end script Now these two run in parallel, so in the logs I often see: main: post-start: some data another data This is not critical, so I won't employ proper synching, but th...

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 lines). ...

Need help running Python app as service in Ubuntu with Upstart

I have written a logging application in Python that is meant to start at boot, but I've been unable to start the app with Ubuntu's Upstart init daemon. When run from the terminal with sudo /usr/local/greeenlog/main.pyw, the application works perfectly. Here is what I've tried for the Upstart job: /etc/init/greeenlog.conf # greeenlog ...

Where does Upstart log to?

I'm trying to figure out why an Upstart job is not starting on startup, but I don't see anything in the syslog about failed attempts. Where does Upstart log to? System: Ubuntu 8.04 description "simple test daemon" start on startup script chdir /home/me exec /usr/bin/python daemon.py & end script I can start the process manually,...

CWD of an Node.js application started with upstart (Ubuntu)

I've coded an node.js app that when get executed need to return CWD from process to be able to read files on disk. When I start the app directly with node in the actual app directory... #!sh node app.js everything is working fine and "process.cwd()" return the good path. But when the script is started with upstart or even direct...

Upstart init is leaking memory, how do you debug it?

I've got a memory leak in Upstart init process (pid 1), what options I have on debugging it? EDIT: Suggest me some real tools for this, manually putting printfs or calculating memory allocations by hand isn't gonna cut it. Also dumping init core and poking around that is not really an option. UPD1: valgrind doesn't work. Replacing /sbi...

how to start an application as soon as the x start up in ubuntu?

Hi , I want to run a gui application as soon as x startup in ubuntu, I found upstart may work,so I create a conf file inside /etc/init/ but it seems that it cann't work correctly. myjob.conf start on startup task exec /home/camino/test/qt/guiapp any suggestions? Thanks advance for your help Best regards ...