<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=2928&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Runit service depend another script not daemon]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2928</link>
		<description><![CDATA[The most recent posts in Runit service depend another script not daemon.]]></description>
		<lastBuildDate>Tue, 02 Jul 2019 18:28:56 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Runit service depend another script not daemon]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=16768#p16768</link>
			<description><![CDATA[<p>I&#039;m not an expert of Runit and I want ask you how make a service depend another script not daemon.<br />For example if I have a service that needs another service:</p><div class="codebox"><pre><code>cat /etc/service/my_service/run
#!/bin/sh
sv start service_required || exit 1
exec my_service</code></pre></div><p>But if &quot;service_required&quot; is not a daemon?</p><p>For example run ssh daemon is required bring a network interface up. <br />Bring a network interface up is accomplished from a simple/very few command/s such as ifup and friend.<br />ifup execute and terminate, and execute again forever.</p><p>I have found a ugly solution. Declare &quot;sv once not-daemon&quot; in the script.<br />Or a very ugly solution: while true; do; read VAR; done and a trap on TERM signal that execute final command<br />(for example ifdown -a at exit).</p><p>Browsing around seems distro put it in stage 1. It&#039;s the cleanest solution... but how to do if I want intersperse<br />daemon and not daemon and define for example a cascade of dependencies like this:<br />service1 (daemon) depends script (not daemon) depends service2 (daemon)?</p>]]></description>
			<author><![CDATA[dummy@example.com (viverna)]]></author>
			<pubDate>Tue, 02 Jul 2019 18:28:56 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=16768#p16768</guid>
		</item>
	</channel>
</rss>
