user upstart job in ~/.init/ is not found

A few points:

  1. User jobs are not enabled by default in Ubuntu. See:

    • http://upstart.ubuntu.com/cookbook/#user-job
    • http://upstart.ubuntu.com/cookbook/#enabling
  2. You never need to reboot after creating any type of Upstart job—they are automatically detected by Upstart (using inotify).

  3. The service command is not part of Upstart—it is the SystemV tool to manipulate SysV jobs. However, Upstart provides SystemV compatibility such that Upstart system jobs can also be manipulated via service (for convenience). The Upstart equivalent commands are start, stop and, restart.

  4. For user jobs, you must use start, stop and, restart (or the initctl equivalents).

Finally, note that user jobs are very basic currently. We plan to enhance them significantly for 12.10 but for now be aware that:

  • Upstart will run all user jobs using /bin/sh -e regardless of which shell you use by default. That -e is also very important (man sh for details).
  • Upstart will only set a minimal set of variables in the user job environment. Hence, you should probably set variables like HOME like this:

    env HOME=/home/james

See:

  • http://upstart.ubuntu.com/cookbook/#env
  • http://upstart.ubuntu.com/cookbook/#export
  • http://upstart.ubuntu.com/cookbook/#debugging-a-script-which-appears-to-be-behaving-oddly