News for hackers. Stuff that matters.
Re:You don't need to daemonize by jebblue on Sunday June 28, 2015 @12:59PM (#9794158)
I wrote a Java server that blocks spam based on my criteria and set it to run like this:

http://manpages.ubuntu.com/manpages/trusty/man8/update-rc.d....

I didn't do any daemonzing like we used to do in the C days so I'm not sure that the systemd approach mentioned in the article does it better (not against the idea, maybe it's needed on non-Ubuntu systems?).

I just needed to write a simple shell script with the basics and this:

...

  case "$1" in
      start)
          startup
      ;;
      stop)
          shutdown
      ;;
      restart)
          restartit
      ;;
  esac
...
Re:You don't need to daemonize by fbuilesv on Sunday June 28, 2015 @03:46PM (#9794790)
If all you're doing is start/stop/restart on Ubuntu you should take a look at Upstart[0]. See a simple example here: http://askubuntu.com/a/251581

[0] http://upstart.ubuntu.com/

Re:You don't need to daemonize by hactually on Sunday June 28, 2015 @07:20PM (#9795537)
upstart is deprecated.
Re:You don't need to daemonize by vezzy-fnord on Sunday June 28, 2015 @07:31PM (#9795580)
Not that I know of. ChromeOS still uses it and though Ubuntu is phasing it out, they haven't completely gotten rid of it as a session manager yet AFAIK. They need to support it for a few more years anyway due to 14.04 LTS.
Re:You don't need to daemonize by hobarrera on Monday June 29, 2015 @04:09PM (#9800607)
That's exactly the difference between deprecated an obsolete. The former means it's on it's way to the latter. Putting work into upstart just means you'll have work migrating to systemd in less than a year or two.
Re:You don't need to daemonize by JdeBP on Sunday June 28, 2015 @11:00PM (#9796193)
I just needed to write a simple shell script ...

If one is using Ubuntu Linux, then it is daft to begin with System 5 rc scripts, given that one already has upstart on version 14 and has systemd on version 15. Ironically, those "basics" are the bits that one doesn't need to write at all. See http://unix.stackexchange.com/a/200281/5132 .