mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-09-19 14:34:23 +00:00
feat: Improved start and stop logic (#1178)
This commit is contained in:
+7
-4
@@ -2,13 +2,16 @@
|
||||
set -Eeuo pipefail
|
||||
|
||||
: "${COM_PORT:="2210"}" # Comm port
|
||||
: "${MON_PORT:="7100"}" # Monitor port
|
||||
: "${WEB_PORT:="5000"}" # Webserver port
|
||||
: "${CHR_PORT:="12345"}" # Character port
|
||||
: "${WSD_PORT:="8004"}" # Websockets port
|
||||
|
||||
cp -r /var/www/* /run/shm
|
||||
rm -f /var/run/websocketd.pid
|
||||
WEB_PID="/run/nginx.pid"
|
||||
WSD_PID="$QEMU_DIR/websocketd.pid"
|
||||
|
||||
cp -r /var/www/* "$QEMU_DIR"
|
||||
rm -f "$WSD_PID"
|
||||
rm -f "$WEB_PID"
|
||||
|
||||
html "Starting $APP for $ENGINE..."
|
||||
|
||||
@@ -32,7 +35,7 @@ if [[ "${WEB:-}" != [Nn]* ]]; then
|
||||
|
||||
# Start websocket server
|
||||
websocketd --address 127.0.0.1 --port="$WSD_PORT" /run/socket.sh >/var/log/websocketd.log &
|
||||
echo "$!" > /var/run/websocketd.pid
|
||||
echo "$!" > "$WSD_PID"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user