runsvchdir(8)
π¦ NAME π¦
okay so bestie, meet runsvchdir(8) β from the System Manager's Manual, no less β and its whole thing is: change services directory of runsvdir(8). That's the name, that's the mission, that's the vibe. π
β¨ SYNOPSIS β¨
runsvchdir dir
One command, one dir, zero mystery. π«Ά
π DESCRIPTION π
dir is a services directory for use with runsvdir(8). Super simple.
If dir does not start with a slash, it gets searched in runsvchdir's working directory β and by default that working directory is /etc/runit/runsvdir/. Slashless besties go there. πΈ
π¨ tiny but iconic rule: dir must not start with a dot.
runsvchdir switches to its working directory, copies current to previous, and replaces current with a symlink pointing to dir. That's the whole glow-up: working dir β copy β symlink. β¨
Normally, /service is a symlink to current, and runsvdir(8) is running /service/. iykyk. π
π ENVIRONMENT π
RUNSVDIRβ the environment variable$RUNSVDIRoverrides the default working directory/etc/runit/runsvdir/. Yes, it's the override queen. π
π EXIT CODES π
- If something goes wrong,
runsvchdirprints an error message and exits111. Not a vibe, but very clear. π - On success,
runsvchdirexits0. Slay. β
π FILES π
/etc/runit/runsvdir/previous
/etc/runit/runsvdir/current
/etc/runit/runsvdir/current.new
π¦ SEE ALSO π¦
Also, the link: https://smarden.org/runit/ π
π AUTHOR π
Gerrit Pape <pape@smarden.org>
Source/version footer: runsvchdir(8) β and date? This copy doesn't show one, so I'm not gonna invent it, bestie. Cute sign-off complete, mwah πβ¨
π¦ where this page comes from
- alpine 3.24: runit-doc 2.3.1-r0 Β· BSD
- nixpkgs unstable: runit 2.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms