mirror of
https://github.com/nestriness/nestri.git
synced 2026-03-16 19:33:07 +02:00
28 lines
460 B
Plaintext
28 lines
460 B
Plaintext
#!/command/with-contenv bash
|
|
set -euo pipefail
|
|
|
|
if [[ -f /etc/nestri/common.sh ]]; then
|
|
source /etc/nestri/common.sh
|
|
else
|
|
exit 1
|
|
fi
|
|
|
|
export VIMPUTTI_PATH="${NESTRI_VIMPUTTI_PATH}"
|
|
|
|
# remove possibly stale socket
|
|
rm -f "/tmp/vimputti-0"
|
|
|
|
s6-setuidgid ${NESTRI_USER} vimputti-manager &
|
|
PROCESS_PID=$!
|
|
|
|
# wait for socket
|
|
while ! test -S "/tmp/vimputti-0"; do
|
|
sleep 1
|
|
done
|
|
|
|
# notify
|
|
printf 'ready\n' >&3
|
|
|
|
# wait till process exists
|
|
wait "${PROCESS_PID}"
|