diff options
| -rw-r--r-- | README.md | 5 | ||||
| -rwxr-xr-x | init.sh | 25 | 
2 files changed, 14 insertions, 16 deletions
@@ -126,10 +126,9 @@ You can make the server run automatically on reboot. This hasn't been tested, th  Add to **roots** crontab (run `sudo crontab -e`):  ``` -@reboot cd ["BASE DIRECTORY"]/LYLLRuoka && node server.js -# For example: -# @reboot cd /home/foobar/LYLLRuoka/LYLLRuoka && node server.js +@reboot BASE_DIR='["BASE_DIRECTORY"]' ["BASE_DIRECTORY"]/LYLLRuoka/init.sh  ``` +For example: `@reboot BASE_DIR='/home/foobar/LYLLRuoka' /home/foobar/LYLLRuoka/LYLLRuoka/init.sh`  # Adding cool data that isn't required for the server to run @@ -1,23 +1,22 @@  #!/bin/sh  exec 1>>/tmp/slogs  exec 2>>/tmp/slogs +echo "========"  echo | date -echo "Init running" +echo "# Init running" -echo "Removing old packages..." -rm -rf $PATH_TO_LYLLRUOKA - -echo "Waiting for connection..." -while [ ! "$(ping 'www.github.com' -c 1)" ] -do +echo "# Waiting for connection..." +while ! ping 'example.org' -c 1; do          sleep 5  done +echo "# Connected to internet!" -cd "${PATH_TO_LYLLRUOKA%%FoodJS}" - -echo "Cloning new packages..." -git clone "https://github.com/JoelHMikael/FoodJS.git" +echo "" -cd $PATH_TO_LYLLRUOKA -echo "Starting server..." +cd "$BASE_DIR/LYLLRuoka" +echo "# node server.js:"  node server.js + +echo "========" +echo "" +echo ""  | 
