Move start and end inside the function

This commit is contained in:
Blade of Darkness 2020-12-05 19:23:46 +01:00
parent 777f51f5f0
commit e3493afa7c
1 changed files with 2 additions and 2 deletions

View File

@ -5,9 +5,11 @@ export SCHED="/dev/shm/ansible_scheduler"
ansible_is_running()
{
touch $RUNNING
cd /var/thunix/ansible
/usr/bin/git pull
/usr/local/bin/ansible-playbook -i /var/thunix/ansible/hosts /var/thunix/ansible/site.yml -u root
rm $RUNNING
}
# sets ansible scheduling
@ -19,9 +21,7 @@ else
while [ -f $SCHED ]
do
rm $SCHED
touch $RUNNING
ansible_is_running
touch $HOOK
rm $RUNNING
done
fi