mirror of
https://github.com/sol1/rustguac.git
synced 2026-10-25 21:19:45 +00:00
Leave shell as PID 1
When rustguac replaces the PID 1 the shell will never invoke the trap
on exit. This leaves the shell as PID 1 for the trap to be invoked
on exit.
(cherry picked from commit 1e31d74312)
This commit is contained in:
committed by
Dave Kempe
parent
bc9e8c6017
commit
2315c9608b
+4
-2
@@ -232,11 +232,13 @@ fi
|
||||
echo "guacd started (pid=$GUACD_PID)"
|
||||
|
||||
# Trap signals to shut down both processes
|
||||
trap 'kill $GUACD_PID 2>/dev/null; wait; exit 0' TERM INT
|
||||
trap 'kill $GUACD_PID 2>/dev/null; kill $RUSTGUAC_PID 2>/dev/null; wait; exit 0' TERM INT
|
||||
|
||||
# Run rustguac in foreground
|
||||
echo "Starting rustguac..."
|
||||
exec /opt/rustguac/bin/rustguac --config "$CONFIG_PATH" serve
|
||||
/opt/rustguac/bin/rustguac --config "$CONFIG_PATH" serve
|
||||
RUSTGUAC_PID=$!
|
||||
wait $RUSTGUAC_PID
|
||||
SCRIPT
|
||||
RUN chmod +x /opt/rustguac/entrypoint.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user