Use standard location for Drush

This commit is contained in:
benjamin melançon 2022-03-06 21:56:28 -05:00
parent f465929ca6
commit f5ef2ef668

View file

@ -50,7 +50,7 @@ done
if [ "$backup" = "true" ]; then if [ "$backup" = "true" ]; then
echo "Backing up live database..." echo "Backing up live database..."
live_backup="prod_$(date +%Y%m%dT%H%M%S).sql" live_backup="prod_$(date +%Y%m%dT%H%M%S).sql"
remote_drush="/home/agaric_live/site/vendor/drush/drush/drush -r /home/agaric_Live/site/web $verbose" remote_drush="/home/agaric_live/site/vendor/bin/drush -r /home/agaric_Live/site/web $verbose"
ssh_cmd="$remote_drush sql-dump --gzip --structure-tables-key=common --result-file=~/backups/$live_backup" ssh_cmd="$remote_drush sql-dump --gzip --structure-tables-key=common --result-file=~/backups/$live_backup"
ssh agaric_live@elizabeth.mayfirst.org $ssh_cmd ssh agaric_live@elizabeth.mayfirst.org $ssh_cmd
live_backup="${live_backup}.gz" live_backup="${live_backup}.gz"
@ -81,7 +81,7 @@ if [ "$target" = "local" ]; then
fi fi
elif [ "$target" = "test" ]; then elif [ "$target" = "test" ]; then
remote_drush="/home/agaric_test/vendor/drush/drush/drush -r /home/agaric_test/site/web $verbose" remote_drush="/home/agaric_test/vendor/bin/drush -r /home/agaric_test/site/web $verbose"
ssh agaric_test@elizabeth.mayfirst.org "${remote_drush} status > /dev/null" || (echo "SSH connection to ${target} or drush status failed - have you set up the key, and does site exist?"; exit 1) ssh agaric_test@elizabeth.mayfirst.org "${remote_drush} status > /dev/null" || (echo "SSH connection to ${target} or drush status failed - have you set up the key, and does site exist?"; exit 1)
ssh_cmd="scp ~/backups/${live_backup} agaric_test@localhost:~/backups" ssh_cmd="scp ~/backups/${live_backup} agaric_test@localhost:~/backups"
ssh agaric_live@elizabeth.mayfirst.org ${ssh_cmd} ssh agaric_live@elizabeth.mayfirst.org ${ssh_cmd}