svclone
—
clone Runit services
svclone |
[-crsu ] svdir ... |
svclone |
[-u ] source target
... |
-c
- Create new service stubs instead of cloning an existing service.
-r
- Remove supervise links from services.
-s
- Regenerate and update all supervise links.
-t
- When cloning a service treat source as a template:
/usr/local/etc/sv/$source-template
-u
- Let created or updated supervise symlinks point into
/var/run/runit/users/$USER instead of
/var/run/runit. This is useful for user level
services as users cannot normally write into
/var/run/runit.
Create a user
runsvdir(8)
service to let kate run her own custom services (managed via
~/service) when the system boots up:
mkdir /usr/local/etc/sv/local
svclone /usr/local/etc/sv/{runsvdir-user-template,local/runsvdir@kate}
ln -s /usr/local/etc/sv/local/runsvdir@kate /var/service
Or the same but using -t
:
mkdir /usr/local/etc/sv/local
svclone -t runsvdir-user local/runsvdir@kate
ln -s /usr/local/etc/sv/local/runsvdir@kate /var/service
kate can now create, enable, and manage a user-level sndiod
instance by herself:
mkdir ~/.sv ~/service
svclone -u /usr/local/etc/sv/sndiod ~/.sv/sndiod
ln -s ~/.sv/sndiod ~/service