1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-01 05:41:31 +00:00
8bitworkshop/scripts/docker/run.sh
Steven Hugg 3a08c24869 EmuHalt is squelched
nes: fixed loadState() npe
2023-11-05 21:27:27 -06:00

22 lines
441 B
Bash

#!/bin/sh
export _8BITWS_SERVER_ROOT=/app
cd "$_8BITWS_SERVER_ROOT"
curl -O https://sehugg.github.io/8bitworkshop/gen/server/server.js
while true; do
node server.js
# Check if the server crashed (exited with a non-zero status)
if [ $? -ne 0 ]; then
echo "Server crashed. Restarting in 10 seconds..."
sleep 10
else
# If the server exited normally (e.g., due to manual termination), exit the loop
break
fi
done