Browse Source

revise clone-typo3-install.sh

Olivier Massot 2 years ago
parent
commit
606bb9c0c8
1 changed files with 3 additions and 3 deletions
  1. 3 3
      typo3/clone-install-on-test.sh

+ 3 - 3
typo3/clone-install-on-test.sh

@@ -20,8 +20,8 @@ fi
 now=$(date '+%Y%m%d-%H%M')
 
 # shellcheck disable=SC2029
-ssh exploitation@prod-front "cd /var/www/typo3/ ; tar cvzf /home/exploitation/typo3_install_$now.tar.gz . --exclude=./public/fileadmin/user_upload/* --exclude=./archive --exclude=./public/fileadmin/_processed_ --exclude=./var/log/* --exclude=./var/cache/*" || exit
-scp exploitation@prod-front:/home/exploitation/typo3_install_$now.tar.gz /home/exploitation || exit
+sudo -u exploitation ssh exploitation@prod-front "cd /var/www/typo3/ ; tar cvzf /home/exploitation/typo3_install_$now.tar.gz . --exclude=./public/fileadmin/user_upload/* --exclude=./archive --exclude=./public/fileadmin/_processed_ --exclude=./var/log/* --exclude=./var/cache/*" || exit
+sudo -u exploitation scp exploitation@prod-front:/home/exploitation/typo3_install_$now.tar.gz /home/exploitation || exit
 
 rm -rf /var/www/typo3 || exit
 mkdir /var/www/typo3
@@ -29,7 +29,7 @@ mkdir /var/www/typo3
 tar xvzf "/home/exploitation/typo3_install_$now.tar.gz" -C /var/www/typo3/ || exit
 rm "/home/exploitation/typo3_install_$now.tar.gz"
 
-ssh exploitation@prod-front "rm /home/exploitation/typo3_install_$now.tar.gz"
+sudo -u exploitation ssh exploitation@prod-front "rm /home/exploitation/typo3_install_$now.tar.gz"
 
 chown -R exploitation:www-data /var/www/typo3