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 $RUNSVDIR overrides the default working directory /etc/runit/runsvdir/. Yes, it's the override queen. πŸ‘‘

πŸ’€ EXIT CODES πŸ’€

  • If something goes wrong, runsvchdir prints an error message and exits 111. Not a vibe, but very clear. 😭
  • On success, runsvchdir exits 0. 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