#!/usr/bin/execlineb -P
pipeline {
    s6-mkdir -p /var/lib/incus-lxcfs
}

# Best-effort OOM protection: adjust our own PID inside foreground{} so the
# EACCES in unprivileged containers (no CAP_SYS_RESOURCE) doesn't abort the run.
getpid OURPID
importas -u OURPID OURPID
foreground { choom -n -1000 -p ${OURPID} }

run-script-daemon incus-lxcfs
