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?
Upstart on Debian?
debian;upstart
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.