replace last run variable

This commit is contained in:
Blade of Darkness 2020-12-05 18:09:03 +01:00
parent 5c53230537
commit c21c6a7f55
1 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
export RUNNING="/dev/shm/ansible_is_running"
export HOOK="/dev/shm/ansible-hook-last-run"
ansible_is_running()
{
@ -10,11 +11,9 @@ ansible_is_running()
if [ -f $RUNNING ]; then
echo "Ansible is currently running."
exit 1
else
touch $RUNNING
ansible_is_running
touch /dev/shm/ansible-hook-last-run
touch $HOOK
rm $RUNNING
exit 0
fi