<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=5061&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] Runit Services?]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=5061</link>
		<description><![CDATA[The most recent posts in [SOLVED] Runit Services?.]]></description>
		<lastBuildDate>Sun, 05 Jun 2022 18:58:50 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] Runit Services?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36155#p36155</link>
			<description><![CDATA[<p>Thanks!</p>]]></description>
			<author><![CDATA[dummy@example.com (sudo)]]></author>
			<pubDate>Sun, 05 Jun 2022 18:58:50 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36155#p36155</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Runit Services?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36153#p36153</link>
			<description><![CDATA[<p>Maybe like this.</p><p>Create the following three files:</p><p>/etc/sv/zramswap/run</p><div class="codebox"><pre><code>#!/usr/bin/env /lib/runit/invoke-run
set -e

exec 2&gt;&amp;1

# don&#039;t restart zramswap when it&#039;s done
sv once zramswap

exec /usr/sbin/zramswap</code></pre></div><p>/etc/sv/zramswap/finish</p><div class="codebox"><pre><code>#!/bin/sh
set -e

. /lib/runit/finish-default &quot;$@&quot;</code></pre></div><p>/etc/sv/zramswap/log/run</p><div class="codebox"><pre><code>#!/bin/sh
set -e

NAME=zramswap
LOG=&quot;/var/log/runit/$NAME&quot;

test -d &quot;$LOG&quot; || mkdir &quot;$LOG&quot; &amp;&amp; chown -R _runit-log:adm &quot;$LOG&quot;
exec chpst -u _runit-log svlogd -tt &quot;$LOG&quot;</code></pre></div><p>Make all three files executable:</p><div class="codebox"><pre><code>chmod +x /etc/sv/zramswap/run /etc/sv/zramswap/finish /etc/sv/zramswap/log/run</code></pre></div><p>Add the service and test to see if it&#039;s running:</p><div class="codebox"><pre><code>update-service --add /etc/sv/zramswap
sv status zramswap</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Sun, 05 Jun 2022 14:36:21 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36153#p36153</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Runit Services?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36151#p36151</link>
			<description><![CDATA[<p>A sysvinit script can be used with runit and <a href="https://git.savannah.nongnu.org/cgit/sysvinit.git/tree/contrib/sysd2v.sh" rel="nofollow">sysd2v.sh</a> can be used to convert the systemd zramswap.service unit file:</p><div class="codebox"><pre><code>[Unit]
Description=Linux zramswap setup
Documentation=man:zramswap(8)

[Service]
EnvironmentFile=-/etc/default/zramswap
ExecStart=/usr/sbin/zramswap start
ExecStop=/usr/sbin/zramswap stop
ExecReload=/usr/sbin/zramswap restart
Type=oneshot
RemainAfterExit=true

[Install]
WantedBy=multi-user.target</code></pre></div><p>^ Copy that to <span class="bbc">zramswap.service</span> then run these commands in the directory containing that file:</p><div class="codebox"><pre><code>wget https://git.savannah.nongnu.org/cgit/sysvinit.git/plain/contrib/sysd2v.sh
chmod +x sysd2v.sh
./sysd2v.sh zramswap.service &gt; zramswap
sudo mv zramswap /etc/init.d/
sudo update-rc.d zramswap defaults</code></pre></div><p>If you want to make a proper runit service instead then see <a href="https://salsa.debian.org/runit-team/runit-services/-/blob/master/debian/README" rel="nofollow">https://salsa.debian.org/runit-team/run … ian/README</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sun, 05 Jun 2022 11:20:03 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36151#p36151</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Runit Services?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36150#p36150</link>
			<description><![CDATA[<p>Hi friends, I wrote the following script for OpenRC that when the computer comes up, start Zram as well, but I decide to use Runit, how is this script written for Runit?</p><div class="codebox"><pre><code>#!/sbin/openrc-run
name=$RC_SVCNAME
command=&quot;zramswap start&quot;</code></pre></div><p>My language is not English, so I apologize in advance for the mistakes you see in my grammar and writing.</p>]]></description>
			<author><![CDATA[dummy@example.com (sudo)]]></author>
			<pubDate>Sun, 05 Jun 2022 07:40:21 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36150#p36150</guid>
		</item>
	</channel>
</rss>
