diff --git a/manifest.json b/manifest.json index e0f4385..6905107 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.2.8" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index b94b85e..59a4771 100644 --- a/scripts/install +++ b/scripts/install @@ -126,10 +126,9 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SETUP APPLICATION WITH CLI #================================================= - ynh_script_progression --message="Configuring the APP..." --weight=1 -ynh_add_config --template="$YNH_APP_BASEDIR/conf/install-config.yml.default" --destination="$final_path/install/install-config.yml" +ynh_add_config --template="../conf/install-config.yml.default" --destination="$final_path/install/install-config.yml" ynh_exec_as "$app" php${phpversion} "$final_path/install/phpbbcli.php" -q --no-interaction install "$final_path/install/install-config.yml" @@ -138,9 +137,9 @@ mv "$final_path/install" "$final_path/install_old" #================================================= # ADD A CRON JOB #================================================= +ynh_script_progression --message="Setuping a cron..." --weight=1 -cron_path="/etc/cron.d/$app" -ynh_add_config --template="../conf/phpbb.cron" --destination="$cron_path" +ynh_add_config --template="../conf/phpbb.cron" --destination="/etc/cron.d/$app" chown root: "$cron_path" chmod 644 "$cron_path" diff --git a/scripts/upgrade b/scripts/upgrade index 35bc1b8..1f6d10e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,12 +38,6 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - if [ -n "$new_phpbb_dir" ]; then - ynh_secure_remove --file="$new_phpbb_dir" - fi - if [ -n "$old_phpbb_dir" ]; then - ynh_secure_remove --file="$old_phpbb_dir" - fi # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -130,18 +124,18 @@ ynh_add_fpm_config #================================================= ynh_script_progression --message="Upgrading the APP..." --weight=1 -ynh_exec_as "$app" php${phpversion} "$final_path/bin/phpbbcli.php" -q --no-interaction db:migrate +ynh_exec_as "$app" php${phpversion} "$final_path/bin/phpbbcli.php" --no-interaction db:migrate --safe-mode if [ -e "$final_path/install" ]; then mv "$final_path/install" "$final_path/install_old" fi #================================================= -# ADD A CRON JOB +# SETUP A CRON #================================================= +ynh_script_progression --message="Setuping a cron..." --weight=1 -cron_path="/etc/cron.d/$app" -ynh_add_config --template="../conf/phpbb.cron" --destination="$cron_path" +ynh_add_config --template="../conf/phpbb.cron" --destination="/etc/cron.d/$app" chown root: "$cron_path" chmod 644 "$cron_path"