"fixed a few issues"

This commit is contained in:
Beth Parker 2024-10-05 17:51:31 -05:00
parent 251f879b1b
commit 8dc583b44e

View file

@ -18,7 +18,7 @@ if [ -f /ansible/current ]; then
regrab=true
else
c_time=`date +%s`
if [ `expr $c_time - $l_time` -gt 120 ]; then
if [[ `expr $c_time - $l_time` -gt 120 ]]; then
regrab=true
fi
fi
@ -32,7 +32,7 @@ if $regrab;then
# verify that download was sucessful
count=`grep -P "(#!/bin/bash)|(end of build_ansible.sh)" /tmp/build_ansible.sh | wc -l`
if [ "$count" != "2" ];then
if [ "$count" != "3" ];then
echo "failed to grab latest build_ansible.sh file, exiting"
exit
fi
@ -44,7 +44,7 @@ if $regrab;then
# verify the parent script is not build_ansible.sh (to prevent the possibility of recurring until the system crashes in the case of an issue)
me=$(basename "$0")
parent=$(ps -o args= $PPID)
if [[ "$PARENT" != *"$ME"* ]];then
if [[ "$parent" != *"$me"* ]];then
/bin/bash /ansible/build_ansible.sh
fi
exit