1#!/sbin/openrc-run23name=$RC_SVCNAME4pidfile="$XDG_RUNTIME_DIR/${SVCNAME}.pid"56: ${instance:="${RC_SVCNAME#apptainer.}"}7: ${envfile="$XDG_CONFIG_HOME/apptainer/$instance"}8: ${extopts:="--containall -w"}9: ${bind:=""}10: ${container:=}1112command=/usr/bin/apptainer13command_args="instance run --pid-file $pidfile"1415[ -z "$envfile" ] || command_args="$command_args --env-file $envfile"1617for i in $bind; do18 command_args="$command_args --bind $i"19done2021command_args="$command_args $extopts $container $instance"22