From 58d5e12f4bcd3381cec96685abab0353e6ffaf63 Mon Sep 17 00:00:00 2001 From: joel Date: Sun, 19 Dec 2021 16:53:49 +0200 Subject: Server init & update --- crontab_add.txt | 6 ++++++ init.sh | 4 ++++ server.js | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 crontab_add.txt create mode 100755 init.sh diff --git a/crontab_add.txt b/crontab_add.txt new file mode 100644 index 0000000..5e7db63 --- /dev/null +++ b/crontab_add.txt @@ -0,0 +1,6 @@ +# these are probably going to need some fixing, for example the shutdown path may differ +# to normal user: +@reboot /home/USERNAME/FoodJS/init.sh + +# to root: +0 0 * * 7 /sbin/shutdown -r now diff --git a/init.sh b/init.sh new file mode 100755 index 0000000..e3436b4 --- /dev/null +++ b/init.sh @@ -0,0 +1,4 @@ +#!/bin/sh +cd /home/joel/FoodJS +git clone "https://github.com/JoelHMikael/FoodJS.git" >> /tmp/test.txt +node ./server.js diff --git a/server.js b/server.js index ba176ef..39c3a38 100644 --- a/server.js +++ b/server.js @@ -59,7 +59,7 @@ async function init() } // start server - http.createServer(server).listen(80); + http.createServer(server).listen(8080); } -- cgit v1.2.3