mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
v2
This commit is contained in:
parent
3e10721aea
commit
c4eeab7e7e
5 changed files with 12 additions and 43 deletions
|
@ -16,7 +16,7 @@ admindoc = "https://github.com/roundcube/roundcubemail/wiki"
|
|||
code = "https://github.com/roundcube/roundcubemail"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.1.19"
|
||||
yunohost = ">= 11.2"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = true
|
||||
|
@ -36,7 +36,7 @@ ram.runtime = "50M"
|
|||
[install.language]
|
||||
ask.en = "Choose the application language"
|
||||
ask.fr = "Choisissez la langue de l'application"
|
||||
type = "string"
|
||||
type = "select"
|
||||
choices = ["de_DE", "en_GB", "fr_FR", "it_IT"]
|
||||
default = "en_GB"
|
||||
|
||||
|
@ -60,7 +60,7 @@ ram.runtime = "50M"
|
|||
main.url = "/"
|
||||
|
||||
[resources.apt]
|
||||
packages = "mariadb-server php-pear php8.1-ldap php8.1-mysql php8.1-json php8.1-cli php8.1-intl php8.1-zip php8.1-gd php8.1-mbstring php8.1-dom php8.1-curl"
|
||||
packages = "mariadb-server, php-pear, php8.2-ldap, php8.1-mysql, php8.1-cli, php8.1-intl, php8.1-zip, php8.1-gd, php8.1-mbstring, php8.1-dom, php8.1-curl"
|
||||
|
||||
[resources.database]
|
||||
type = "mysql"
|
||||
|
|
|
@ -22,8 +22,6 @@ fpm_usage="low"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=2
|
||||
|
||||
ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
||||
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
||||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||
|
@ -36,7 +34,6 @@ ynh_script_progression --message="Setting up source files..." --weight=7
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
|
@ -48,11 +45,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
|
||||
|
@ -74,8 +66,7 @@ ynh_install_composer
|
|||
#=================================================
|
||||
ynh_script_progression --message="Initializing database..." --weight=3
|
||||
|
||||
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \
|
||||
< "$install_dir/SQL/mysql.initial.sql"
|
||||
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$install_dir/SQL/mysql.initial.sql"
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE ROUNDCUBE
|
||||
|
|
|
@ -17,11 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." --
|
|||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3
|
||||
|
||||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
|
|
|
@ -16,10 +16,16 @@ ynh_script_progression --message="Restoring $app main directory..." --weight=4
|
|||
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=5
|
||||
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -27,25 +33,8 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig
|
|||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated php-fpm config
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=5
|
||||
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -72,7 +72,6 @@ then
|
|||
ynh_setup_source --dest_dir="$install_dir"
|
||||
fi
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
|
@ -82,12 +81,7 @@ chown -R $app:www-data "$install_dir"
|
|||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
|
Loading…
Reference in a new issue