diff --git a/scripts/_common.sh b/scripts/_common.sh index 38e1984..ff6ed04 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,3 +1,7 @@ +# Version numbers +flarum_version="0.1.0-beta.7.1" +ssowat_ext_ver="0.5" + # Execute a command as another user # usage: exec_as USER COMMAND [ARG ...] exec_as() { @@ -65,7 +69,7 @@ install_and_activate_extension() { local new_extensions_enabled # Install extension - exec_composer $AS_USER $WORKDIR "require $EXTENSION --ansi -d $WORKDIR" + exec_composer $AS_USER $WORKDIR "require $EXTENSION -n --ansi -d $WORKDIR" # Retrieve current extensions sql_command="SELECT \`value\` FROM settings WHERE \`key\` = 'extensions_enabled'" diff --git a/scripts/backup b/scripts/backup index aa59f65..1d863fd 100644 --- a/scripts/backup +++ b/scripts/backup @@ -50,6 +50,7 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= ynh_backup "/etc/php5/fpm/pool.d/$app.conf" +ynh_backup "/etc/php5/fpm/conf.d/20-$app.ini" #================================================= # BACKUP THE MYSQL DATABASE diff --git a/scripts/install b/scripts/install index 5cc2bcc..1474aaa 100644 --- a/scripts/install +++ b/scripts/install @@ -40,8 +40,6 @@ admin=$YNH_APP_ARG_ADMIN title=$YNH_APP_ARG_TITLE is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE -flarum_version="v0.1.0-beta.7" -ssowat_ext_ver="*@dev" bazaar_extension=$YNH_APP_ARG_BAZAAR_EXTENSION #=================================================== @@ -72,6 +70,7 @@ ynh_app_setting_set $app is_public $is_public ynh_app_setting_set $app language $language ynh_app_setting_set $app final_path $final_path ynh_app_setting_set $app flarum_version $flarum_version +ynh_app_setting_set $app ssowat_ext_ver $ssowat_ext_ver ynh_app_setting_set $app bazaar_extension $bazaar_extension #=================================================== @@ -102,7 +101,10 @@ sudo chown -R $app:www-data $tmp sudo chmod -R 0775 $tmp # Install Flarum -exec_composer $app $final_path "create-project flarum/flarum $tmp $flarum_version --stability=beta --ansi -d $tmp" +# First, create the project with core and all basic extensions +exec_composer $app $final_path "create-project flarum/flarum $tmp --stability=beta --ansi -d $tmp" +# Let's fix the core version by explicitely requiring it +exec_composer $app $final_path "require flarum/core:$flarum_version -n --ansi -d $tmp" # Copy Flarum to working directory and clean temp directory sudo cp -Rf $tmp/* $final_path @@ -205,7 +207,7 @@ sql_command="REPLACE INTO \`settings\` (\`key\`, \`value\`) VALUES ('mail_port', '587');" ynh_mysql_execute_as_root "$sql_command" $db_name -# Install and active the SSOwat auth extension +# Install and activate the SSOwat auth extension install_and_activate_extension $app $final_path $db_name "tituspijean/flarum-ext-auth-ssowat:$ssowat_ext_ver" "tituspijean-auth-ssowat" # Configure SSOwat auth extension ssowatdomain=$(