Supervised services. To be deprecated by [[systemd]].

== Beispiel-Setup ==

<source lang=bash>apt-get install runit</source>
<source lang=bash>mkdir /etc/service/$name</source>
<source lang=bash>cat > /etc/service/$name/run</source>
<pre>
#!/bin/sh

exec 2>&1
exec chpst -u $user -U $user -- kabelsalatd
^D
</pre>
<source lang=bash>chmod a+x /etc/service/$name/run</source>
<source lang=bash>sv status /etc/service/$name/</source>

=== Logging ===

<source lang=bash>mkdir /var/log/$name /etc/service/$name/log</source>
<source lang=bash>cat > /etc/service/$name/log/run</source>
<pre>
#!/bin/sh

exec svlogd -ttt /var/log/$name
^D
</pre>
<source lang=bash>chmod a+x /etc/service/$name/log/run</source>

[[category:systemd]]
