From 67f51d0a3a8bb7181637b3c1aa428463e099cbc9 Mon Sep 17 00:00:00 2001 From: Jan <> Date: Thu, 16 Dec 2021 12:21:45 +0100 Subject: auto pulling from git repo --- install.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 install.sh (limited to 'install.sh') diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..e75462d --- /dev/null +++ b/install.sh @@ -0,0 +1,23 @@ +cd /var/www/html +git clone $GITURL sui +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 -- cgit v1.2.3 From eeef988d8fa320df418e101dd3fe67fbcb6fd3d9 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 16 Dec 2021 16:09:25 +0100 Subject: Update install.sh --- install.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'install.sh') diff --git a/install.sh b/install.sh index e75462d..1c91950 100644 --- a/install.sh +++ b/install.sh @@ -1,5 +1,6 @@ cd /var/www/html git clone $GITURL sui +shopt -s dotglob mv sui/* . rm -rf sui echo "pulled update" -- cgit v1.2.3