From 1aa243d47e1013f3dcca3d7fdc8ffce0f4c0ebfa Mon Sep 17 00:00:00 2001 From: aymhce Date: Sun, 5 Jun 2016 10:26:45 +0200 Subject: [PATCH] secure composer --- scripts/install | 4 ++-- scripts/upgrade | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 11b6ae7..1b7e786 100644 --- a/scripts/install +++ b/scripts/install @@ -73,10 +73,10 @@ sudo yunohost app ssowatconf sudo apt-get install libav-tools -y # Ampache installation -cd /var/www/$app +cd $final_path sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" sudo php composer-setup.php -sudo php composer.phar install --prefer-source --no-interaction +sudo -u www-data php composer.phar install --prefer-source --no-interaction echo "127.0.0.1 $domain #yunoampache" | sudo tee -a /etc/hosts sleep 1 diff --git a/scripts/upgrade b/scripts/upgrade index 80eb20f..d2454c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,8 +39,8 @@ sudo yunohost app setting $app skipped_uris -v "/" sudo yunohost app ssowatconf # Ampache installation -cd /var/www/$app -sudo php composer.phar install --prefer-source --no-interaction +cd $final_path +sudo -u www-data php composer.phar install --prefer-source --no-interaction echo "127.0.0.1 $domain #yunoampache" | sudo tee -a /etc/hosts sleep 1