Staging files for www-run webhook

This commit is contained in:
Ubergeek 2019-03-21 12:39:51 +00:00
parent 8d78c41ec8
commit 827f9e6c11
3 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,15 @@
#!/bin/bash
export RUNNING="/dev/shm/www_is_running"
if [ -f $RUNNING ]; then
echo "www is currently running."
exit 1
else
touch $RUNNING
cd /var/www/thunix.cf
/usr/bin/git pull
rm /dev/shm/run-www
touch /dev/shm/www-hook-last-run
rm $RUNNING
exit 0
fi

View File

@ -0,0 +1,6 @@
[Unit]
Description=www-run path
[Path]
PathModified=/dev/shm/run-www
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,4 @@
[Unit]
Description=www-run
[Service]
ExecStart=/usr/local/bin/www-run