6 ms·
For anyone packaging software on Linux, this now means every major distro - Debian, RHEL/CentOS, Arch and now Ubuntu - supports .service files. No need for bas
by nailer 11y ago
For anyone packaging software on Linux, this now means every major distro - Debian, RHEL/CentOS, Arch and now Ubuntu - supports .service files.
No need for bash scripts, custom watchdog and daemonise tools, etc.
- atonse 11y agoThis is pretty much the only reason I've been waiting for 16.04 – to get rid of upstart scripts and standardize on systemd. Still going to wait for a couple months while people iron out initial bugs but definitely excited about this release.
- listic 11y ago> to wait for a couple months while people iron out initial bugs There's going to be a 16.04.1 release just 3 months away from the initial LTS release; I believe it is just for that. https://wiki.ubuntu.com/TrustyTahr/ReleaseSchedule https://wiki.ubuntu.com/TrustyTahr/ReleaseSchedule - this schedule is for 14.04, but I believe it's been the same for quite a few years already.
- atonse 11y agoGreat, thanks. I will probably install this on internal servers (non-production, non-critical, CI, etc) first because I'm also impatient. :)
- soccerdave 11y agoI wonder how big the installation of Amazon Linux is? They are still not on systemd. Also, CentOS 6 still has support for 4 more years so probably can't throw away all the bash yet.
- falcolas 11y agoVery good points. Amazon linux is pretty popular within AWS, and LTS CentOS and RHEL have huge install bases for larger corporate environments. For that matter, Ubuntu 14.04 is still supported for another two years, and that's still upstart.
- ptman 11y agoThree more years: https://wiki.ubuntu.com/LTS https://wiki.ubuntu.com/LTS
- ac 11y agoCould you, please, explain what .service files are and how they eliminate the need for bash scripts etc? Couldn't find anything in search results.
- praseodym 11y agosystemd services, that replace traditional init.d scripts and provide watchdog options, daemonising, etc. https://www.freedesktop.org/software/systemd/man/systemd.service.html https://www.freedesktop.org/software/systemd/man/systemd.ser...
- deleted 11y ago[deleted]
- yrro 11y agohttp://0pointer.de/blog/projects/systemd-for-admins-3.html http://0pointer.de/blog/projects/systemd-for-admins-3.html
- ZoF 11y agoThis site's down, 80/443 both closed.
- JdeBP 11y agoThen read the Ubuntu doco. * http://manpages.ubuntu.com/manpages/wily/en/man5/systemd.service.5.html http://manpages.ubuntu.com/manpages/wily/en/man5/systemd.ser... * http://manpages.ubuntu.com/manpages/wily/en/man5/systemd.unit.5.html http://manpages.ubuntu.com/manpages/wily/en/man5/systemd.uni... * https://wiki.ubuntu.com/SystemdForUpstartUsers https://wiki.ubuntu.com/SystemdForUpstartUsers * http://askubuntu.com/questions/636899/ http://askubuntu.com/questions/636899/ * http://askubuntu.com/a/613814/43344 http://askubuntu.com/a/613814/43344
- mdeeks 11y agoGoogle cache: http://webcache.googleusercontent.com/search?q=cache:ADZV5sJtaTgJ:0pointer.de/blog/projects/systemd-for-admins-3.html+&cd=2&hl=en&ct=clnk&gl=us http://webcache.googleusercontent.com/search?q=cache:ADZV5sJ...
- stephenr 11y ago> No need for bash scripts Friends don't let friends write shell scripts targeting bash. For context: Bash is not available|installed everywhere, and has some inter-version weirdness. Write clean, posix-compliant shell scripts (i.e. target /bin/sh commonly referred to as bourne shell) and you're in a much better position. On Debian your script will be run by Dash, on OS X it will be run by Bash, on Ubuntu or RedHat it could be different again, but the point is, they are specifically running in POSIX mode, so that you get reliable, reproducible results across systems and even across Bash versions.
- peatmoss 11y agoYou're getting downvoted to oblivion, but I'm old enough to remember not being able to take bash for granted. The default shell on some modern systems (OpenBSD for example) comes to mind as well. I feel this battle has mostly been lost, however.
- stephenr 11y agoHN coolkids downvoting advice that makes software more portable and reliable. What a fucking shock.
- 9912891 11y agoThey use bash as a service. It's integrated in node.js 2041.4.1.
- privong 11y ago> HN coolkids downvoting advice that makes software more portable and reliable. What a fucking shock. A little more verbosity on the advice might have helped. I wouldn't have properly understood you were saying without @peatmoss's reply. So without the context, your original comment just seemed like knee-jerk bash-bashing.
- slavik81 11y agoUnless you've actually tested it with a shell other than bash, you should be marking it as bash. Otherwise it's likely it will not actually be portable between shells, and you will have made your software less reliable. I've encountered many scripts written by developers on Fedora that totally fail over when run on Ubuntu specifically due to using #!/bin/sh when they really required #!/bin/bash.
- viraptor 11y agoUpstart provided comparable service for years. There was no reason to use bash scripts and watchdogs / restarters before.
- vidarh 11y agoYes, there was a reason: Having to support other distros. The big deal now is that all the major distributions support the same mechanism.
- e12e 11y agoWhich of course still leaves OS X, *bsd, Solaris AFAIK. But it should cut down on the internal Linux incompatibilities a bit. I'm not a fan of systemd, but having one broken standard is much better than having four broken standards :-)
- lomnakkus 11y ago> Which of course still leaves OS X, bsd, Solaris AFAIK. AFAIUI OS X has launchd, and Solaris has OMF[1]? ... so basically the BSDs are the ones left behind? [1] I think that is the acronym for Solaris' XML-based standardized system service files? (I don't care that they're XML. It care that they're standardized.)
- solarengineer 11y agoSolaris 10 and 11 have SMF
- lomnakkus 11y agoAh, SMF, that was it! Thanks
- JdeBP 11y agoThinking that the BSDs have been left behind is to erroneously presume that the BSDs ran System 5 rc in the first place. They did not. Most of them use Mewburn rc (or their own reinvented version thereof), which was invented almost a decade after van Smoorenburg rc, which itself was invented about half a decade after System 5 rc. Here's a "portable" script for van Smoorenburg rc that ports to 4 Linux families, complete with the sort of case statements that I described in https://news.ycombinator.com/item?id=10357589 https://news.ycombinator.com/item?id=10357589 : * http://conman.googlecode.com/svn/trunk/etc/conman.init.in http://conman.googlecode.com/svn/trunk/etc/conman.init.in Here's a Mewburn rc script: * http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/etc/rc.d/devpubd http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/etc/rc.d/...