mirror of
https://github.com/nestriness/nestri.git
synced 2026-03-17 03:43:07 +02:00
feat: WIP s6-overlay and friends
This commit is contained in:
@@ -0,0 +1 @@
|
||||
3
|
||||
25
packages/configs/s6-overlay/nestri-server/run
Normal file
25
packages/configs/s6-overlay/nestri-server/run
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/command/with-contenv bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ -f /etc/nestri/common.sh ]]; then
|
||||
source /etc/nestri/common.sh
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove possibly stale socket
|
||||
rm -f "${NESTRI_XDG_RUNTIME_DIR}/wayland-1"
|
||||
|
||||
s6-setuidgid ${NESTRI_USER} nestri-server $NESTRI_PARAMS &
|
||||
PROCESS_PID=$!
|
||||
|
||||
# wait for socket
|
||||
while ! test -S "${NESTRI_XDG_RUNTIME_DIR}/wayland-1"; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# notify
|
||||
printf 'ready\n' >&3
|
||||
|
||||
# wait till process exists
|
||||
wait "${PROCESS_PID}"
|
||||
1
packages/configs/s6-overlay/nestri-server/type
Normal file
1
packages/configs/s6-overlay/nestri-server/type
Normal file
@@ -0,0 +1 @@
|
||||
longrun
|
||||
Reference in New Issue
Block a user