diff options
author | Cem Keylan <cem@ckyln.com> | 2020-04-19 01:51:56 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-04-19 01:51:56 +0300 |
commit | eee8ed1b68d88c087ccf7f30d75affaf45407ce6 (patch) | |
tree | 3154a728d0970ddf7e4a3a1dd06433b620aaa548 | |
parent | 14d6f10d8a795db06c2b74b655f287dfdb35e8b7 (diff) | |
download | website-eee8ed1b68d88c087ccf7f30d75affaf45407ce6.tar.gz |
pulled wiki
-rw-r--r-- | docs/news.xml | 2 | ||||
-rw-r--r-- | docs/rss.xml | 2 | ||||
-rw-r--r-- | docs/wiki/system/service-management.html | 74 | ||||
-rw-r--r-- | docs/wiki/system/service-management.txt | 82 | ||||
-rw-r--r-- | src/wiki/system/service-management.md | 82 |
5 files changed, 186 insertions, 56 deletions
diff --git a/docs/news.xml b/docs/news.xml index 86c0acc..b2ea0d9 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -9,7 +9,7 @@ <description>a simple busybox linux distribution</description> <link>https://carbslinux.org</link> <atom:link href="https://carbslinux.org/news.xml" rel="self" type="application/rss+xml" /> -<lastBuildDate>Apr Sun 2020 23:00</lastBuildDate> +<lastBuildDate>Apr Sat 2020 22:00</lastBuildDate> <item> <title>20200410.news</title> <pubDate>Fri, 10 Apr 2020</pubDate> diff --git a/docs/rss.xml b/docs/rss.xml index 479bdcc..6ff9a4c 100644 --- a/docs/rss.xml +++ b/docs/rss.xml @@ -9,7 +9,7 @@ <description>a simple busybox linux distribution</description> <link>https://carbslinux.org</link> <atom:link href="https://carbslinux.org/rss.xml" rel="self" type="application/rss+xml" /> -<lastBuildDate>Apr Sun 2020 23:00</lastBuildDate> +<lastBuildDate>Apr Sat 2020 22:00</lastBuildDate> <item> <title>Outsource Repository Concept</title> <pubDate>Fri, 10 Apr 2020</pubDate> diff --git a/docs/wiki/system/service-management.html b/docs/wiki/system/service-management.html index 40d9c54..da639fb 100644 --- a/docs/wiki/system/service-management.html +++ b/docs/wiki/system/service-management.html @@ -16,36 +16,82 @@ <a href='/wiki'>wiki</a> <a href='/wiki/install.html'>installation</a> </nav></div><div class="border"></div> -<h1>Service Management</h1> +<p>Carbs Linux uses <code>busybox-runit</code> by default, but the repository additionally has the +original <code>runit</code> and <code>sysmgr</code>. You can install either with <code>kiss b runit; kiss i runit</code> +or <code>kiss b sysmgr; kiss i sysmgr</code>.</p> -<p>Carbs Linux uses busybox-runit as the default system supervisor.</p> +<h1>runit</h1> -<h2>Enabling Services</h2> +<p><strong>Enabling a Service</strong></p> -<p>Services start immediately when you enable them, and run by default on boot.</p> +<pre><code>ln -sf /etc/sv/acpid /var/service +</code></pre> + +<p><strong>Disabling a Service</strong></p> + +<pre><code>unlink /var/service/acpid +</code></pre> + +<p><strong>Starting a Service</strong></p> + +<pre><code>sv start acpid +</code></pre> + +<p><strong>Stopping a Service</strong></p> + +<pre><code>sv stop acpid +</code></pre> -<pre><code>$ ln -s /etc/sv/acpid /var/service +<p>For more information refer to the <code>sv --help</code> output. Also check out the <code>sv(8)</code> +manual page if you have installed the <code>runit</code> package.</p> + +<h1>sysmgr</h1> + +<p><a href="https://github.com/cemkeylan/sysmgr">sysmgr</a> is POSIX-sh service supervisor written by me. Its usage resembles +<code>runit</code>. The biggest difference is that <code>sysmgr</code> uses service files instead +of directories with run scripts inside.</p> + +<h2>svctl</h2> + +<p><code>svctl</code> is the equivalant of <code>sv</code> for sysmgr. You can run the above commands for +<code>runit</code> and use <code>svctl</code> instead of <code>sv</code>. Those would be as follows.</p> + +<p><strong>Enabling a Service</strong></p> + +<pre><code>ln -sf /etc/sysmgr/acpid /var/sysmgr </code></pre> -<h2>Disabling a service</h2> +<p><strong>Disabling a Service</strong></p> -<pre><code>$ unlink /var/service/acpid +<pre><code>unlink /var/sysmgr/acpid </code></pre> -<h2>Starting a service</h2> +<p><strong>Starting a Service</strong></p> -<pre><code>$ sv start acpid +<pre><code>svctl start acpid </code></pre> -<h2>Stopping a service</h2> +<p><strong>Stopping a Service</strong></p> -<pre><code>$ sv stop acpid +<pre><code>svctl stop acpid </code></pre> -<h2>More</h2> +<h2>Switching from runit</h2> + +<p>Switching from <code>runit</code> is fairly easy. You can run the following commands to get +started with <code>sysmgr</code>.</p> + +<pre><code># Create the directories if you haven't yet +mkdir -p /var/sysmgr /etc/sysmgr -<p>Runit is extremely flexible and simple. Refer to <code>sv</code>, <code>runsv</code>, <code>svc</code>, <code>runsvdir</code> -help outputs for more information.</p> +# Copy all of the run scripts to /etc/sysmgr +set -- /etc/sv/* +for service; do cp "$service/run" "/etc/sysmgr/${service##*/}" ; done + +# Link all enabled services +set -- /var/service/* +for service; do ln -sf /etc/sysmgr/${service##*/} /var/sysmgr ; done +</code></pre> <a href="/wiki/system/service-management.txt">View Page Source</a><div class=border></div> <p class=footer>Linux® is a registered trademark of Linus Torvalds</p> <p class=footer>Copyright © 2019-2020 Cem Keylan</p> diff --git a/docs/wiki/system/service-management.txt b/docs/wiki/system/service-management.txt index fc49f60..2133ea5 100644 --- a/docs/wiki/system/service-management.txt +++ b/docs/wiki/system/service-management.txt @@ -1,39 +1,81 @@ -Service Management -================== +Carbs Linux uses `busybox-runit` by default, but the repository additionally has the +original `runit` and `sysmgr`. You can install either with `kiss b runit; kiss i runit` +or `kiss b sysmgr; kiss i sysmgr`. -Carbs Linux uses busybox-runit as the default system supervisor. +runit +===== +**Enabling a Service** -Enabling Services ------------------ + ln -sf /etc/sv/acpid /var/service -Services start immediately when you enable them, and run by default on boot. +**Disabling a Service** + unlink /var/service/acpid - $ ln -s /etc/sv/acpid /var/service +**Starting a Service** + sv start acpid -Disabling a service -------------------- +**Stopping a Service** - $ unlink /var/service/acpid + sv stop acpid +For more information refer to the `sv --help` output. Also check out the `sv(8)` +manual page if you have installed the `runit` package. -Starting a service ------------------- - $ sv start acpid +sysmgr +====== +[sysmgr] is POSIX-sh service supervisor written by me. Its usage resembles +`runit`. The biggest difference is that `sysmgr` uses service files instead +of directories with run scripts inside. -Stopping a service ------------------- - $ sv stop acpid +svctl +----- +`svctl` is the equivalant of `sv` for sysmgr. You can run the above commands for +`runit` and use `svctl` instead of `sv`. Those would be as follows. -More ----- -Runit is extremely flexible and simple. Refer to `sv`, `runsv`, `svc`, `runsvdir` -help outputs for more information. +**Enabling a Service** + + ln -sf /etc/sysmgr/acpid /var/sysmgr + +**Disabling a Service** + + unlink /var/sysmgr/acpid + +**Starting a Service** + + svctl start acpid + +**Stopping a Service** + + svctl stop acpid + + +Switching from runit +-------------------- + +Switching from `runit` is fairly easy. You can run the following commands to get +started with `sysmgr`. + + + # Create the directories if you haven't yet + mkdir -p /var/sysmgr /etc/sysmgr + + # Copy all of the run scripts to /etc/sysmgr + set -- /etc/sv/* + for service; do cp "$service/run" "/etc/sysmgr/${service##*/}" ; done + + # Link all enabled services + set -- /var/service/* + for service; do ln -sf /etc/sysmgr/${service##*/} /var/sysmgr ; done + + + +[sysmgr]: https://github.com/cemkeylan/sysmgr diff --git a/src/wiki/system/service-management.md b/src/wiki/system/service-management.md index d279b86..8aff8a6 100644 --- a/src/wiki/system/service-management.md +++ b/src/wiki/system/service-management.md @@ -1,40 +1,82 @@ Title: Service Management -Service Management -================== +Carbs Linux uses `busybox-runit` by default, but the repository additionally has the +original `runit` and `sysmgr`. You can install either with `kiss b runit; kiss i runit` +or `kiss b sysmgr; kiss i sysmgr`. -Carbs Linux uses busybox-runit as the default system supervisor. +runit +===== +**Enabling a Service** -Enabling Services ------------------ + ln -sf /etc/sv/acpid /var/service -Services start immediately when you enable them, and run by default on boot. +**Disabling a Service** + unlink /var/service/acpid - $ ln -s /etc/sv/acpid /var/service +**Starting a Service** + sv start acpid -Disabling a service -------------------- +**Stopping a Service** - $ unlink /var/service/acpid + sv stop acpid +For more information refer to the `sv --help` output. Also check out the `sv(8)` +manual page if you have installed the `runit` package. -Starting a service ------------------- - $ sv start acpid +sysmgr +====== +[sysmgr] is POSIX-sh service supervisor written by me. Its usage resembles +`runit`. The biggest difference is that `sysmgr` uses service files instead +of directories with run scripts inside. -Stopping a service ------------------- - $ sv stop acpid +svctl +----- +`svctl` is the equivalant of `sv` for sysmgr. You can run the above commands for +`runit` and use `svctl` instead of `sv`. Those would be as follows. -More ----- -Runit is extremely flexible and simple. Refer to `sv`, `runsv`, `svc`, `runsvdir` -help outputs for more information. +**Enabling a Service** + + ln -sf /etc/sysmgr/acpid /var/sysmgr + +**Disabling a Service** + + unlink /var/sysmgr/acpid + +**Starting a Service** + + svctl start acpid + +**Stopping a Service** + + svctl stop acpid + + +Switching from runit +-------------------- + +Switching from `runit` is fairly easy. You can run the following commands to get +started with `sysmgr`. + + + # Create the directories if you haven't yet + mkdir -p /var/sysmgr /etc/sysmgr + + # Copy all of the run scripts to /etc/sysmgr + set -- /etc/sv/* + for service; do cp "$service/run" "/etc/sysmgr/${service##*/}" ; done + + # Link all enabled services + set -- /var/service/* + for service; do ln -sf /etc/sysmgr/${service##*/} /var/sysmgr ; done + + + +[sysmgr]: https://github.com/cemkeylan/sysmgr |