diff --git a/manifest.toml b/manifest.toml index 777796f..88a4b94 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Yourls" description.en = "URL shortening service" description.fr = "Service de raccourcisseur d'URL" -version = "1.9.2~ynh3" +version = "1.9.2~ynh4" maintainers = [""] @@ -20,8 +20,11 @@ code = "https://github.com/YOURLS/YOURLS" yunohost = ">= 11.2" architectures = "all" multi_instance = true + ldap = false + sso = false + disk = "50M" ram.build = "150M" ram.runtime = "50M" @@ -48,7 +51,7 @@ ram.runtime = "50M" ask.en = "Choose the application language" ask.fr = "Choisissez la langue de l'application" type = "select" - select = ["fr_FR", "en_US"] + choices = ["fr_FR", "en_US"] default = "fr_FR" [resources] diff --git a/scripts/change_url b/scripts/change_url index 7d940e9..6a0f44b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -23,7 +23,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 domain=$new_domain path=$new_path -ynh_add_config --template="../conf/config-sample.php" --destination="$install_dir/user/config.php" +ynh_add_config --template="config-sample.php" --destination="$install_dir/user/config.php" chmod 600 "$install_dir/user/config.php" chown $app:$app "$install_dir/user/config.php" diff --git a/scripts/install b/scripts/install index efae5bf..1af5f6c 100644 --- a/scripts/install +++ b/scripts/install @@ -36,7 +36,7 @@ ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir/user/languages" --source_id="fr" # copy index file -cp ../conf/index.php $install_dir/ +ynh_add_config --template="index.php" --destination="$install_dir/index.php" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -50,14 +50,14 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 ynh_add_nginx_config # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config #================================================= # ADD A CONFIGURATION #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config-sample.php" --destination="$install_dir/user/config.php" +ynh_add_config --template="config-sample.php" --destination="$install_dir/user/config.php" chmod 600 "$install_dir/user/config.php" chown $app:$app "$install_dir/user/config.php" diff --git a/scripts/restore b/scripts/restore index 9d4d5e5..d25e51e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -19,6 +19,13 @@ ynh_restore_file --origin_path="$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 #================================================= @@ -28,13 +35,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# 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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4db063e..320f234 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,7 +36,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config