Where should I put my Upstart scripts?

I'm trying to figure out Upstart and I'm not sure if I should put them in

/etc/init

or

~/.config/upstart

And what is the difference between the locations?

1 Answer

/etc/init is for system jobs - those services which are started independent of any user being logged in. These are typically system services. By default, commands are run as root unless setuid is used.

~/.config/upstart is for session jobs - these are run for a user logged into the GUI.

What does your Upstart job do?

  • Is it performing some function for some logged in user, specific to them? Use ~/.config/upstart.
  • Does it not need a user logged in do its work, or need to run when the system starts? Use /etc/init.
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like