diff options
| author | Jan <> | 2021-12-16 12:21:45 +0100 |
|---|---|---|
| committer | Jan <> | 2021-12-16 12:21:45 +0100 |
| commit | 67f51d0a3a8bb7181637b3c1aa428463e099cbc9 (patch) | |
| tree | fd429032a23232967f217672b98b43c88b9ba74b /install.sh | |
| parent | 804a22bcbed289b1ace576b6fe670b88cf0d207f (diff) | |
auto pulling from git repo
Diffstat (limited to 'install.sh')
| -rw-r--r-- | install.sh | 23 |
1 files changed, 23 insertions, 0 deletions
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 |