[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/27 14:04 (UTC)] – chrisabela | howtos:slackware_admin:runit [2019/05/29 11:27 (UTC)] – Improvements and clarifications in Chapter 6 chrisabela | ||
---|---|---|---|
Line 225: | Line 225: | ||
</ | </ | ||
- | In order to let the non-privileged user (say user chris) run it, change the ownership of the service directory | + | In order to let the non-privileged user (say user bob) run it, change the ownership of the service directory |
< | < | ||
- | chown chris.users / | + | chown bob.users / |
</ | </ | ||
Line 234: | Line 234: | ||
< | < | ||
- | mkdir -p /home/chris/runit/logs | + | mkdir -p /home/bob/runit/logs |
</ | </ | ||
Line 254: | Line 254: | ||
< | < | ||
- | chmod +x /home/chris/ | + | chmod +x /home/bob/ |
</ | </ | ||
Line 260: | Line 260: | ||
< | < | ||
- | /home/chris/ | + | /home/bob/ |
</ | </ | ||
Line 268: | Line 268: | ||
#!/bin/sh -e | #!/bin/sh -e | ||
exec 2>&1 | exec 2>&1 | ||
- | exec chpst -u chris /home/chris/ | + | exec chpst -u bob /home/bob/ |
</ | </ | ||
Line 289: | Line 289: | ||
< | < | ||
#!/bin/sh | #!/bin/sh | ||
- | exec chpst -u chris svlogd -tt /home/chris/runit/logs | + | exec chpst -u bob svlogd -tt /home/bob/runit/logs |
</ | </ | ||
Line 298: | Line 298: | ||
</ | </ | ||
- | Run the sv service to ensure that it works: | + | Log in as root and run the sv service to ensure that it works: |
< | < | ||
+ | su - | ||
/ | / | ||
</ | </ | ||
Line 311: | Line 312: | ||
Watch how your " | Watch how your " | ||
+ | |||
+ | As your non-privilged user: | ||
< | < | ||
- | tail -f /home/chris/ | + | tail -f /home/bob/runit/ |
</ | </ | ||
+ | |||
+ | Hit CTRL+C to exit. | ||
+ | |||
+ | Finally, 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 361: | Line 374: | ||
< | < | ||
- | sv start sshd | + | sv start example |
- | sv stop sshd | + | sv stop example |
- | sv restart | + | sv restart |
</ | </ | ||
Line 529: | Line 542: | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
{{tag> | {{tag> | ||
- | |||
- | |||