"fixed a few issues"
This commit is contained in:
parent
251f879b1b
commit
8dc583b44e
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ if [ -f /ansible/current ]; then
|
||||||
regrab=true
|
regrab=true
|
||||||
else
|
else
|
||||||
c_time=`date +%s`
|
c_time=`date +%s`
|
||||||
if [ `expr $c_time - $l_time` -gt 120 ]; then
|
if [[ `expr $c_time - $l_time` -gt 120 ]]; then
|
||||||
regrab=true
|
regrab=true
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -32,7 +32,7 @@ if $regrab;then
|
||||||
|
|
||||||
# verify that download was sucessful
|
# verify that download was sucessful
|
||||||
count=`grep -P "(#!/bin/bash)|(end of build_ansible.sh)" /tmp/build_ansible.sh | wc -l`
|
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"
|
echo "failed to grab latest build_ansible.sh file, exiting"
|
||||||
exit
|
exit
|
||||||
fi
|
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)
|
# 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")
|
me=$(basename "$0")
|
||||||
parent=$(ps -o args= $PPID)
|
parent=$(ps -o args= $PPID)
|
||||||
if [[ "$PARENT" != *"$ME"* ]];then
|
if [[ "$parent" != *"$me"* ]];then
|
||||||
/bin/bash /ansible/build_ansible.sh
|
/bin/bash /ansible/build_ansible.sh
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Add table
Reference in a new issue