Skip to content

Instantly share code, notes, and snippets.

@colstrom
Last active December 9, 2016 18:53
Show Gist options
  • Select an option

  • Save colstrom/065e53cebdf54121f00025684651ac38 to your computer and use it in GitHub Desktop.

Select an option

Save colstrom/065e53cebdf54121f00025684651ac38 to your computer and use it in GitHub Desktop.
import-services: imports services from mounted persistence to ephemeral rootfs
name = import-services
author = Chris Olstrom
license = MIT
provides = command/import-services
requires
command/execlineb
command/find
command/forbacktickx
command/foreground
command/import
command/ln
#!/bin/execlineb
foreground {
forbacktickx service { find /service -type d -mindepth 1 -maxdepth 1 }
import service
ln -sf $service /run/openrc/s6-scan/
}
s6-svscanctl -a /run/openrc/s6-scan/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment