This commit is contained in:
Valeria Fadeeva 2023-12-12 11:56:55 +05:00
parent fe8f94c4bb
commit e266e5bacb
1 changed files with 3 additions and 1 deletions

View File

@ -8,15 +8,17 @@ if [[ $? == 0 ]]; then
ping -c 1 10.120.152.1
if [[ $? == 0 ]]; then
ip=$ip1
git='work'
fi
else
ping -c 1 192.168.1.250
if [[ $? == 0 ]]; then
ip=$ip2
git='origin'
fi
fi
git add . && git commit -m "Update" && git push
git add . && git commit -m "Update" && git push $git
ssh ${ip} -f '~/update-site.sh'
status=$?