aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crontab_add.txt6
-rwxr-xr-xinit.sh4
-rw-r--r--server.js2
3 files changed, 11 insertions, 1 deletions
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);
}