[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
howtos:slackware_admin:runit [2019/05/28 12:20 (UTC)] – [7.1. Stop/Start/Restart] chrisabela | howtos:slackware_admin:runit [2019/09/16 06:40 (UTC)] – Typos in Chapter 8 (runevels) are corrected chrisabela | ||
---|---|---|---|
Line 10: | Line 10: | ||
To read on the benefits of runit, see here: http:// | To read on the benefits of runit, see here: http:// | ||
+ | |||
+ | Unless otherwise stated, all commands in this article are to be run by root. | ||
===== 2. Use runit with traditional init ===== | ===== 2. Use runit with traditional init ===== | ||
Line 81: | Line 83: | ||
If you followed the previous chapter, then stop runsvdir and reverse all the changes that you made on your system. | If you followed the previous chapter, then stop runsvdir and reverse all the changes that you made on your system. | ||
- | Remove | + | So, remove |
< | < | ||
Line 87: | Line 89: | ||
</ | </ | ||
- | Reboot: | + | And reboot: |
< | < | ||
Line 225: | Line 227: | ||
</ | </ | ||
- | In order to let the non-privileged | + | As a non-priviliged |
- | + | ||
- | < | + | |
- | chown bob.users / | + | |
- | </ | + | |
- | + | ||
- | As a non-priviliged user, create some directories | + | |
< | < | ||
Line 237: | Line 233: | ||
</ | </ | ||
- | Then edit a script that simulates a (finicky) service in a convenient directory; say | + | Then edit a ''/ |
< | < | ||
Line 263: | Line 259: | ||
</ | </ | ||
- | Edit a file called ''/ | + | Log in back as root and edit a file called ''/ |
< | < | ||
Line 298: | Line 294: | ||
</ | </ | ||
- | Log in as root and run the sv service to ensure that it works: | + | Run the service to ensure that it works: |
< | < | ||
- | su - | ||
/ | / | ||
</ | </ | ||
Line 317: | Line 312: | ||
< | < | ||
tail -f / | tail -f / | ||
- | CTRL+c | ||
</ | </ | ||
+ | |||
+ | Hit CTRL+C to exit. | ||
+ | |||
+ | Finally, login back as root and let bob take the ownership of the whole ''/ | ||
+ | |||
+ | < | ||
+ | chown -R bob.users / | ||
+ | </ | ||
+ | |||
+ | Now bob can manage this service with the '' | ||
===== 7. Managing Services with sv ===== | ===== 7. Managing Services with sv ===== | ||
Line 420: | Line 424: | ||
===== 8. Runlevels ===== | ===== 8. Runlevels ===== | ||
- | If you installed the slackbuild configuration files, you have two runlevels: default and single. The current runlevel is default. You can verify by looking under ''/ | + | If you installed the slackbuild configuration files, you have two runlevels: default and single. The current runlevel is default. You can verify by looking under ''/ |
Change runlevel to another runlevel; single: | Change runlevel to another runlevel; single: | ||
Line 428: | Line 432: | ||
</ | </ | ||
- | You will see that ''/ | + | You will see that ''/ |
< | < | ||
Line 434: | Line 438: | ||
</ | </ | ||
- | You can create any other runlevel and name them as you like. To start you can copy an existing runlevel directory and modify as you wish. | + | You can create any other runlevel and name them as you like. To start, you can copy an existing runlevel directory and modify as you wish. |
< | < | ||
Line 444: | Line 448: | ||
===== 9. run scripts ===== | ===== 9. run scripts ===== | ||
- | Only one executable can be called for a service | + | Only one executable can be called for a service |
In direct contrast to Slackware' | In direct contrast to Slackware' | ||
Line 533: | Line 537: | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
{{tag> | {{tag> | ||
+ |