[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.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howtos:slackware_admin:runit [2019/05/27 14:04 (UTC)] chrisabelahowtos:slackware_admin:runit [2019/05/28 12:20 (UTC)] – [7.1. Stop/Start/Restart] chrisabela
Line 225: Line 225:
 </code> </code>
  
-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
  
 <code> <code>
-chown chris.users /etc/sv/example+chown bob.users /etc/sv/example
 </code> </code>
  
Line 234: Line 234:
  
 <code> <code>
-mkdir -p /home/chris/runit/logs+mkdir -p /home/bob/runit/logs
 </code> </code>
  
Line 254: Line 254:
  
 <code> <code>
-chmod +x /home/chris/runit/service.sh+chmod +x /home/bob/runit/service.sh
 </code> </code>
  
Line 260: Line 260:
  
 <code> <code>
-/home/chris/runit/service.sh+/home/bob/runit/service.sh
 </code> </code>
  
Line 268: Line 268:
 #!/bin/sh -e #!/bin/sh -e
 exec 2>&1 exec 2>&1
-exec chpst -u chris /home/chris/runit/service.sh+exec chpst -u bob /home/bob/runit/service.sh
 </code> </code>
  
Line 289: Line 289:
 <code> <code>
 #!/bin/sh #!/bin/sh
-exec chpst -u chris svlogd -tt /home/chris/runit/logs+exec chpst -u bob svlogd -tt /home/bob/runit/logs
 </code> </code>
  
Line 298: Line 298:
 </code> </code>
  
-Run the sv service to ensure that it works:+Log in as root and run the sv service to ensure that it works:
  
 <code> <code>
 +su -
 /etc/sv/example/run /etc/sv/example/run
 </code> </code>
Line 311: Line 312:
  
 Watch how your "service" works, crashes, but it is recovered by runit: Watch how your "service" works, crashes, but it is recovered by runit:
 +
 +As your non-privilged user:
  
 <code> <code>
-tail -f /home/chris/logs/current +tail -f /home/bob/runit/logs/current  
 +CTRL+c
 </code> </code>
  
Line 361: Line 365:
  
 <code> <code>
-sv start sshd+sv start example
  
-sv stop sshd+sv stop example
  
-sv restart sshd+sv restart example
 </code> </code>
  
Line 529: Line 533:
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 {{tag>init runit}} {{tag>init runit}}
- 
- 
- 
 howtos:slackware_admin:runit ()