Staging files for www-run webhook
This commit is contained in:
parent
8d78c41ec8
commit
827f9e6c11
|
@ -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
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=www-run path
|
||||
[Path]
|
||||
PathModified=/dev/shm/run-www
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,4 @@
|
|||
[Unit]
|
||||
Description=www-run
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/www-run
|
Loading…
Reference in New Issue