Last active
December 16, 2015 12:28
-
-
Save mamuz/5434595 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# configs | |
SSH_USR='myuser' | |
DIR_SRC='/update/directory' | |
# destinations | |
SERVER1[0]='custom-app1' | |
SERVER1[1]='custom-app2' | |
SERVER1[2]='custom-app3' | |
SERVER1[3]='custom-app4' | |
# change to source | |
cd $DIR_SRC | |
# push | |
for i in "${SERVER1[@]}"; do | |
echo "scp push to "$i":" | |
scp -r * ${SSH_USR}@server-address1.com:/working/directory/$i | |
echo "++++++++++++++++++++" | |
done | |
# clean | |
rm -rf * | |
# success message | |
echo "update for app done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment