mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-24 13:40:17 +00:00
Staging files for www-run webhook
This commit is contained in:
15
roles/webserver/files/www-run
Normal file
15
roles/webserver/files/www-run
Normal 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
|
||||
6
roles/webserver/files/www-run.path
Normal file
6
roles/webserver/files/www-run.path
Normal file
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=www-run path
|
||||
[Path]
|
||||
PathModified=/dev/shm/run-www
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
4
roles/webserver/files/www-run.service
Normal file
4
roles/webserver/files/www-run.service
Normal file
@@ -0,0 +1,4 @@
|
||||
[Unit]
|
||||
Description=www-run
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/www-run
|
||||
Reference in New Issue
Block a user