diff options
author | Joel Kronqvist <work.joelkronqvist@gmail.com> | 2022-10-25 18:57:32 +0300 |
---|---|---|
committer | Joel Kronqvist <work.joelkronqvist@gmail.com> | 2022-10-25 18:57:32 +0300 |
commit | bd8e36aec2c6a78594c34066edc34b309cac2e0c (patch) | |
tree | b1a44c2ee85340a115c3dc683c8f02f64a1a119e /init.sh | |
parent | 569fe38f54b21d9b7de5a8b48cbf14987383281d (diff) | |
download | LYLLRuoka-bd8e36aec2c6a78594c34066edc34b309cac2e0c.tar.gz LYLLRuoka-bd8e36aec2c6a78594c34066edc34b309cac2e0c.zip |
Fixed shift parsing when no teacher is supplied. Made server be run in a loop in init.sh to bring it up again if it crashes.
Diffstat (limited to 'init.sh')
-rwxr-xr-x | init.sh | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1,8 +1,7 @@ #!/bin/sh -exec 1>>/tmp/slogs -exec 2>>/tmp/slogs -echo "========" -echo | date +exec 1>>/var/slogs +exec 2>>/var/slogs +echo "" echo "# Init running" echo "# Waiting for connection..." @@ -22,9 +21,11 @@ echo "# Database seems to be available (ignore error messages above)" echo "" cd "$BASE_DIR/LYLLRuoka" -echo "# node server.js:" -node server.js +while echo "# node server.js:"; do + node server.js -echo "========" -echo "" -echo "" + # Sleep below, so that the loop can't cause too big a load to the server, if the server terminates very fast. + sleep 5 + echo "SERVER TERMINATED!" + echo "--------" +done |