mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-02 17:08:38 +08:00
systemd
This commit is contained in:
parent
eb7011f15a
commit
f23c6ed6b1
@ -35,18 +35,18 @@ copy_credential() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
set +e
|
|
||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
printf "Try to get credentials for %d times\n" "$counter"
|
set +e
|
||||||
|
echo "Try to get credentials for %d times\n" "$counter" >> /tmp/copy
|
||||||
|
|
||||||
copy_credential "websoft9-git" "/var/websoft9/credential" "websoft9-apphub" "/websoft9/credentials/credential_git"
|
copy_credential "websoft9-git" "/var/websoft9/credential" "websoft9-apphub" "/websoft9/credentials/credential_git"
|
||||||
copy_credential "websoft9-deployment" "/var/websoft9/credential" "websoft9-apphub" "/websoft9/credentials/credential_deployment"
|
copy_credential "websoft9-deployment" "/var/websoft9/credential" "websoft9-apphub" "/websoft9/credentials/credential_deployment"
|
||||||
copy_credential "websoft9-proxy" "/var/websoft9/credential" "websoft9-apphub" "/websoft9/credentials/credential_proxy"
|
copy_credential "websoft9-proxy" "/var/websoft9/credential" "websoft9-apphub" "/websoft9/credentials/credential_proxy"
|
||||||
|
|
||||||
if docker exec "websoft9-apphub" [ -f "/websoft9/credentials/credential_git" ] && \
|
if docker exec "websoft9-apphub" [ -s "/websoft9/credentials/credential_git" ] && \
|
||||||
docker exec "websoft9-apphub" [ -f "/websoft9/credentials/credential_deployment" ] && \
|
docker exec "websoft9-apphub" [ -s "/websoft9/credentials/credential_deployment" ] && \
|
||||||
docker exec "websoft9-apphub" [ -f "/websoft9/credentials/credential_proxy" ]; then
|
docker exec "websoft9-apphub" [ -s "/websoft9/credentials/credential_proxy" ]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
if [ $counter -gt $try_times ]; then
|
if [ $counter -gt $try_times ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user