bubblewrap your openrc services
Go to file
Alex McGrath 1c10ee0fc1
also log stdout
2023-07-28 12:00:43 +01:00
LICENSE initial commit 2023-07-26 12:56:13 +01:00
README.md fmt 2023-07-26 13:04:04 +01:00
bwrap.confd fmt 2023-07-26 13:04:04 +01:00
bwrap.initd also log stdout 2023-07-28 12:00:43 +01:00


Bubblewrapped OpenRC scripts

This is a script to semi-easily bubblewrap your openrc scripts.

This is not very tested yet and I am quite bad at writing shell scripts so its probably not the best to use :)

Bubblewrap a script

To create a bubblewrapped script symlink the bwrap service to something like bwrap.$servicename

cd /etc/init.d
ln -s bwrap bwrap.servicename

Then copy the bwrap config file in /etc/conf.d/bwrap to /etc/conf.d/bwrap.servicename and configure it.

Example configuration for the Gonic music server

# user/group to run the service as
# the command that should be wrapped
# the arguments passed to the wrapped command
wrapped_args="-music-path=/media/music -podcast-path=/media/podcasts -db-path=/var/lib/gonic/gonic.db -cache-path=/var/cache/gonic/"

# mounts that will be read only for the service

# writable mounts for the service
# paths to check exist before starting the service in the format, passed to `checkpath`
# MODE PATH FILE_TYPE (f for file, d for directory)
0755 /var/lib/gonic d
0755 /var/cache/gonic d


Inspiration from qemu-openrc: https://github.com/jirutka/qemu-openrc/