summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorJeroen <jeroenpardon@users.noreply.github.com>2022-02-12 02:46:27 +0100
committerGitHub <noreply@github.com>2022-02-12 02:46:27 +0100
commitccb68263177a27a57fed98ee52b98e64d5462609 (patch)
tree6019c700272c32a812776cacb2e293a19119822f /install.sh
parent804a22bcbed289b1ace576b6fe670b88cf0d207f (diff)
parent8ceb1d5301bcaf2a8e5e108d895fc46b0c6aab27 (diff)
Merge pull request #26 from jrodan/master
auto pulling from git repo
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..1c91950
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,24 @@
+cd /var/www/html
+git clone $GITURL sui
+shopt -s dotglob
+mv sui/* .
+rm -rf sui
+echo "pulled update"
+
+# Copy hello-cron file to the cron.d directory
+cp sui-cron /etc/cron.d/sui-cron
+
+# Give execution rights on the cron job
+chmod 0644 /etc/cron.d/sui-cron
+
+# set pull script permissions
+chmod +x gitpull.sh
+
+# Apply cron job
+crontab /etc/cron.d/sui-cron
+
+# Create the log file to be able to run tail
+touch /var/log/cron.log
+
+# configure nginx
+echo "daemon off;" >> /etc/nginx/nginx.conf