Rich Freeman on 3 Aug 2018 15:32:52 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] LINUX ADMIN ADVICE |
On Fri, Aug 3, 2018 at 2:27 PM Steve Litt <slitt@troubleshooters.com> wrote: > > Observe the following runit run script: > > ===================================================== > #!/bin/sh > if network_up; then > exec thedaemon --forground > fi > sleep 1 > ===================================================== > Wow, that is equivalent to 1 line in a service unit (or more likely about 15 characters more on an existing line), except that for systemd that unit would also start the service on boot, and also shut down the daemon when the network is down. No need to sleep at the end either... -- Rich ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug