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 have packages, did a apt-get install upstart, but it asks to remove sysvinit, which I know will/might screw up my system. So how do I make my Ubuntu script work on Debian?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

It’s not directly about Debian vs Ubuntu, it’s about SysVinit vs Upstart. Debian defaults to SysVinit; you can install Upstart, but you need to know what you’re doing, and you should be familiar with it before you even think of installing it on a production server. Although it’s theoretically possible to install both, with only one of them running as process number 1, Debian doesn’t support this out the box.

Upstart is younger than SysVinit and has more capabilities, which explains why you can’t just take an Upstart service description and feed it to SysVinit. You’ll have to write a script for /etc/init.d. Basically that script needs to look at its first argument ($1) and start, stop or restart the service as directed.

If you were using Upstart events to determine when to start the script, you’ll have to use some other methods. Upstart gathers events from many different sources; you can get the trigger from wherever Upstart gets it, Upstart in this respect is just a convenient way of not having to look for triggers in many different places and protocols.

Method 2

The reason it’s going to remove sysvinit is because these two are conflicts. Also, note that sysvinit is considered essential (read: not to be removed, unless you know what you are doing).

Part of the output from ‘aptitude show upstart`:

Conflicts: startup-tasks, system-services, sysvinit, upstart-compat-sysv, upstart-job

If you can afford to hose your system, go ahead and install it.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x