aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-04-19 01:51:56 +0300
committerCem Keylan <cem@ckyln.com>2020-04-19 01:51:56 +0300
commiteee8ed1b68d88c087ccf7f30d75affaf45407ce6 (patch)
tree3154a728d0970ddf7e4a3a1dd06433b620aaa548 /src
parent14d6f10d8a795db06c2b74b655f287dfdb35e8b7 (diff)
downloadwebsite-eee8ed1b68d88c087ccf7f30d75affaf45407ce6.tar.gz
pulled wiki
Diffstat (limited to 'src')
-rw-r--r--src/wiki/system/service-management.md82
1 files changed, 62 insertions, 20 deletions
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