1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bookstack_ynh.git synced 2024-09-03 18:16:02 +02:00

add composer

This commit is contained in:
liberodark 2019-07-29 20:00:49 +02:00
parent 3b8b8b9a5f
commit a2f00bb65e

View file

@ -119,6 +119,27 @@ ynh_replace_string "yunouser" "$db_name" "$final_path/.env"
ynh_replace_string "yunopass" "$db_pwd" "$final_path/.env"
ynh_replace_string "yunobase" "$db_name" "$final_path/.env"
#=================================================
# INSTALL COMPOSER
#=================================================
ynh_print_info "Install composer"
EXPECTED_SIGNATURE=$(wget https://composer.github.io/installer.sig -O - -q)
curl -s https://getcomposer.org/installer > composer-setup.php
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" = "$ACTUAL_SIGNATURE" ]
then
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
else
>&2 echo 'ERROR: Invalid composer installer signature'
rm composer-setup.php
exit 1
fi
#=================================================
# NGINX CONFIGURATION
#=================================================