mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-25 13:40:17 +00:00
Helps to add all the files
This commit is contained in:
14
roles/shell/files/gopher-run
Normal file
14
roles/shell/files/gopher-run
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
export RUNNING="/dev/shm/gopher_is_running"
|
||||
|
||||
if [ -f $RUNNING ]; then
|
||||
echo "Gopher is currently running."
|
||||
exit 1
|
||||
else
|
||||
touch $RUNNING
|
||||
cd /var/gopher
|
||||
/usr/bin/git pull
|
||||
touch /dev/shm/ansible-hook-last-run
|
||||
rm $RUNNING
|
||||
exit 0
|
||||
fi
|
||||
6
roles/shell/files/gopher-run.path
Normal file
6
roles/shell/files/gopher-run.path
Normal file
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=gopher-run path
|
||||
[Path]
|
||||
PathModified=/dev/shm/gopher-ansible
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
4
roles/shell/files/gopher-run.service
Normal file
4
roles/shell/files/gopher-run.service
Normal file
@@ -0,0 +1,4 @@
|
||||
[Unit]
|
||||
Description=gopher-run
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/gopher-run
|
||||
Reference in New Issue
Block a user