#!/bin/bash #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= # SYSTEM CONFIGURATIONS #================================================= ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 ynh_add_nginx_config ynh_add_fpm_config #================================================= # SPECIFIC SETUP #================================================= # INSTALL COMPOSER #================================================= ynh_script_progression --message="Installing Composer..." --weight=1 ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir" #================================================ # CONCRETE5 INSTALLATION #================================================= ynh_script_progression --message="Concrete5 Installation, the installation can take long. So be patient ! :)" --weight=1 admin_email=$(ynh_user_get_info --username="$admin" --key="mail") ynh_app_setting_set --app="$app" --key=admin_email --value="$admin_email" ynh_mysql_execute_as_root --sql="ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" pushd "$install_dir" ./concrete/bin/concrete5 c5:install --db-server=localhost \ --db-username="$db_user" \ --db-database="$db_name" \ --db-password="$db_pwd" \ --site="$website_title" \ --admin-email="$admin_email" \ --admin-password="$password" \ --language="$language" \ --site-locale="$language" \ --verbose \ --no-interaction \ --allow-as-root popd chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Installation of $app completed" --last