3 ms·
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.8.html htt
by jebblue 11y ago
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.8.html 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
...
- deleted 11y ago[deleted]
- fbuilesv 11y agoIf 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 http://askubuntu.com/a/251581 [0] http://upstart.ubuntu.com/ http://upstart.ubuntu.com/
- hactually 11y agoupstart is deprecated.
- vezzy-fnord 11y agoNot 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.
- hobarrera 11y agoThat'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.
- JdeBP 11y agoI 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 http://unix.stackexchange.com/a/200281/5132 .