1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpbb_ynh.git synced 2024-09-03 19:56:36 +02:00
This commit is contained in:
ericgaspar 2021-11-06 16:11:05 +01:00
parent 99f1bcaaa9
commit be3e858ced
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 8 additions and 15 deletions

View file

@ -22,7 +22,7 @@
"email": ""
},
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.2.8"
},
"multi_instance": true,
"services": [

View file

@ -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"

View file

@ -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"