<?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=1730&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Conversion of simple systemd script to non-systemd]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=1730</link>
		<description><![CDATA[The most recent posts in Conversion of simple systemd script to non-systemd.]]></description>
		<lastBuildDate>Sun, 19 Nov 2017 15:37:22 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Conversion of simple systemd script to non-systemd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=6351#p6351</link>
			<description><![CDATA[<p>It looks like you could just replace the systemd commands with non-systemd commands. I don&#039;t know i3. How does it handle running those commands as root? Or does user have privilege for the shutdown and reboot commands? For hibernate and suspend, you can use &#039;pm-hibernate&#039; and &#039;pm-suspend&#039;. </p><p>Whenever I use a window manager without a diplay manager, I give my user sudo nopasswd permission for those commands.</p><p>It&#039;s also possible to let dbus manage the session, and then you can use dbus commands for shutdown, etc. I think that&#039;s been discussed somewhere on this forum. If you need that and can&#039;t find it, just say so. </p><p>This looks like the easy solution. No idea here if it works. (Note: Tags to put this in a code box are right above the message text box when you&#039;re composing.)</p><div class="codebox"><pre class="vscroll"><code>#!/bin/sh
lock() {
    i3lock
}

case &quot;$1&quot; in
    lock)
        lock
        ;;
    logout)
        i3-msg exit
        ;;
    suspend)
        lock &amp;&amp; pm-suspend
        ;;
    hibernate)
        lock &amp;&amp; pm-hibernate
        ;;
    reboot)
        reboot
        ;;
    shutdown)
        poweroff
        ;;
    *)
        echo &quot;Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}&quot;
        exit 2
esac

exit 0</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Sun, 19 Nov 2017 15:37:22 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=6351#p6351</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conversion of simple systemd script to non-systemd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=6342#p6342</link>
			<description><![CDATA[<p>I don&#039;t know!</p><p>However, I was just reading the message on DNG from Steve Litt about process supervisors :-</p><p><a href="https://lists.dyne.org/lurker/message/20171118.075328.25730dd3.en.html" rel="nofollow">https://lists.dyne.org/lurker/message/2 … d3.en.html</a></p><p>I wonder whether this might be a way forwards.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Sun, 19 Nov 2017 10:42:20 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=6342#p6342</guid>
		</item>
		<item>
			<title><![CDATA[Conversion of simple systemd script to non-systemd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=6308#p6308</link>
			<description><![CDATA[<p>Hi,</p><p>running devuan ascii with i3 window manager.<br />I would like to&#160; convert a not too complex i3 script, meant for systemd, to work with devuan so that I can use it to control pm-suspend or an alternative suspend/hibernate/shutdown tool with it.</p><p>Could somebody tell me how to transform it?<br />The code is:</p><p>#!/bin/sh<br />lock() {<br />&#160; &#160; i3lock<br />}</p><p>case &quot;$1&quot; in<br />&#160; &#160; lock)<br />&#160; &#160; &#160; &#160; lock<br />&#160; &#160; &#160; &#160; ;;<br />&#160; &#160; logout)<br />&#160; &#160; &#160; &#160; i3-msg exit<br />&#160; &#160; &#160; &#160; ;;<br />&#160; &#160; suspend)<br />&#160; &#160; &#160; &#160; lock &amp;&amp; systemctl suspend<br />&#160; &#160; &#160; &#160; ;;<br />&#160; &#160; hibernate)<br />&#160; &#160; &#160; &#160; lock &amp;&amp; systemctl hibernate<br />&#160; &#160; &#160; &#160; ;;<br />&#160; &#160; reboot)<br />&#160; &#160; &#160; &#160; systemctl reboot<br />&#160; &#160; &#160; &#160; ;;<br />&#160; &#160; shutdown)<br />&#160; &#160; &#160; &#160; systemctl poweroff<br />&#160; &#160; &#160; &#160; ;;<br />&#160; &#160; *)<br />&#160; &#160; &#160; &#160; echo &quot;Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}&quot;<br />&#160; &#160; &#160; &#160; exit 2<br />esac</p><p>exit 0</p>]]></description>
			<author><![CDATA[dummy@example.com (lunario)]]></author>
			<pubDate>Sat, 18 Nov 2017 16:17:43 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=6308#p6308</guid>
		</item>
	</channel>
</rss>
