mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
systemd
This commit is contained in:
parent
e966a5873b
commit
7d048fab6d
@ -4,11 +4,12 @@ set -e
|
|||||||
|
|
||||||
trap "sleep 1; continue" ERR
|
trap "sleep 1; continue" ERR
|
||||||
|
|
||||||
counter=0
|
counter=1
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
|
echo Try to get credentia for $counter times
|
||||||
if [ -f "/data/websoft9/credential_git" ]; then
|
if [ -f "/data/websoft9/credential_git" ]; then
|
||||||
echo "/data/websoft9/credential_git is exist"
|
echo "/data/websoft9/credential_git is exist"
|
||||||
else
|
else
|
||||||
@ -38,14 +39,15 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "/data/websoft9/credential_git" ] && [ -f "/data/websoft9/credential_deployment" ] && [ -f "/data/websoft9/credential_proxy" ]; then
|
if [ -f "/data/websoft9/credential_git" ] && [ -f "/data/websoft9/credential_deployment" ] && [ -f "/data/websoft9/credential_proxy" ]; then
|
||||||
exit 0
|
break
|
||||||
else
|
else
|
||||||
if [ $counter -gt 30 ]; then
|
if [ $counter -gt 30 ]; then
|
||||||
echo "Systemd can not get all credentials by excuting 30 times"
|
echo "Systemd can not get all credentials by excuting 30 times"
|
||||||
exit 1
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
tail -f /dev/null
|
Loading…
Reference in New Issue
Block a user