Install composer

This commit is contained in:
Bob Mottram 2017-07-25 22:11:03 +01:00
parent dc4f99a740
commit dd04199b4a
4 changed files with 23 additions and 22 deletions

View File

@ -560,6 +560,10 @@ function install_kanboard {
logging_off_kanboard logging_off_kanboard
initialise_database kanboard /var/www/${KANBOARD_DOMAIN_NAME}/htdocs/app/Schema/Sql/mysql.sql initialise_database kanboard /var/www/${KANBOARD_DOMAIN_NAME}/htdocs/app/Schema/Sql/mysql.sql
chown -R www-data:www-data /var/www/${KANBOARD_DOMAIN_NAME}/htdocs
cd /var/www/${KANBOARD_DOMAIN_NAME}/htdocs
install_composer
systemctl restart mariadb systemctl restart mariadb
systemctl restart php7.0-fpm systemctl restart php7.0-fpm

View File

@ -715,21 +715,9 @@ function install_koel {
install_koel_main install_koel_main
cd /var/www/$KOEL_DOMAIN_NAME/htdocs cd /var/www/$KOEL_DOMAIN_NAME/htdocs
install_composer
# curl -sS https://getcomposer.org/installer | php
if [ -f ~/freedombone/image_build/composer_install ]; then
cat ~/freedombone/image_build/composer_install | php
else
if [ -f /home/$MY_USERNAME/freedombone/image_build/composer_install ]; then
cat /home/$MY_USERNAME/freedombone/image_build/composer_install | php
fi
fi
npm install -g yarn npm install -g yarn
php composer.phar install
if [ ! "$?" = "0" ]; then
echo $'Unable to run composer install'
exit 7252198
fi
npm install npm install
function_check get_mariadb_password function_check get_mariadb_password

View File

@ -383,15 +383,8 @@ function install_movim {
# Fix typo # Fix typo
sed -i 's|weksocket|websocket|g' app/widgets/AdminTest/admintest.js sed -i 's|weksocket|websocket|g' app/widgets/AdminTest/admintest.js
# curl -sS https://getcomposer.org/installer | php cd /var/www/$MOVIM_DOMAIN_NAME/htdocs
if [ -f ~/freedombone/image_build/composer_install ]; then install_composer
cat ~/freedombone/image_build/composer_install | php
else
if [ -f /home/$MY_USERNAME/freedombone/image_build/composer_install ]; then
cat /home/$MY_USERNAME/freedombone/image_build/composer_install | php
fi
fi
php composer.phar install
cd /var/www/$MOVIM_DOMAIN_NAME/htdocs/config cd /var/www/$MOVIM_DOMAIN_NAME/htdocs/config
cp db.example.inc.php db.inc.php cp db.example.inc.php db.inc.php

View File

@ -917,4 +917,20 @@ function create_default_web_site {
fi fi
} }
function install_composer {
# curl -sS https://getcomposer.org/installer | php
if [ -f ~/${PROJECT_NAME}/image_build/composer_install ]; then
cat ~/${PROJECT_NAME}/image_build/composer_install | php
else
if [ -f /home/$MY_USERNAME/${PROJECT_NAME}/image_build/composer_install ]; then
cat /home/$MY_USERNAME/${PROJECT_NAME}/image_build/composer_install | php
fi
fi
php composer.phar install
if [ ! "$?" = "0" ]; then
echo $'Unable to run composer install'
exit 7252198
fi
}
# NOTE: deliberately no exit 0 # NOTE: deliberately no exit 0