aboutsummaryrefslogtreecommitdiff
path: root/init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'init.sh')
-rwxr-xr-xinit.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/init.sh b/init.sh
index 2fc915d..5fb171f 100755
--- a/init.sh
+++ b/init.sh
@@ -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