Created
January 6, 2016 22:29
-
-
Save anonymous/7bcdac7fa384723b1e91 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
Environment=DEV1 | |
ssh -T scpuser@otherhost<<EOSSH | |
ls /home/shared/scpuser/jenkinsBackup/$Environment/ | xargs rm | |
EOSSH | |
echo "Web image stuff" | |
ssh -T apache@host<<'EOSSH' | |
cd /var/www/htdocs/sales/JenkinsBackup | |
echo "test" | |
echo $Environment | |
Environment=$(hostname | head -c4) | |
echo $Environment | |
if [ "$(ls -A /var/www/htdocs/sales/JenkinsBackup)" ]; then | |
ls /var/www/htdocs/sales/JenkinsBackup | grep $Environment | xargs rm | |
echo "Removing previous tars" | |
fi | |
##more stuff | |
EOSSH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment