1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00
This commit is contained in:
Éric Gaspar 2023-02-03 22:35:46 +01:00
parent 8fd043f76c
commit ce5b9992d0
3 changed files with 3 additions and 21 deletions

View file

@ -92,7 +92,7 @@ ynh_script_progression --message="Applying Nextcloud specific modifications..."
# Define a function to execute commands with `occ`
exec_occ() {
(cd "$final_path" && ynh_exec_as "$app" \
(cd "$install_dir" && ynh_exec_as "$app" \
php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
}

View file

@ -24,7 +24,7 @@ current_fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
get__maintenance_mode() {
# Maintenance mode status
maintenance_mode_status="$(cd "$final_path" && ynh_exec_as "$app" \
maintenance_mode_status="$(cd "$install_dir" && ynh_exec_as "$app" \
php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:mode)" 2> /dev/null
if echo $maintenance_mode_status | grep -q "disabled"
then

View file

@ -30,24 +30,6 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..."
# If db_name doesn't exist, create it
if [ -z "$db_name" ]; then
db_name=$(ynh_sanitize_dbid --db_name=$app)
#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name
fi
# If install_dir doesn't exist, create it
if [ -z "$install_dir" ]; then
#REMOVEME? install_dir=/var/www/$app
#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
fi
# If data_dir doesn't exist, create it
if [ -z "$data_dir" ]; then
data_dir=/home/yunohost.app/$app
#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir
fi
# Remove the option backup_core_only if it's in the settings.yml file
ynh_app_setting_delete --app=$app --key=backup_core_only
@ -282,7 +264,7 @@ EOF
)
# Replace the old nextcloud by the new one
#REMOVEME? ynh_secure_remove --file="$install_dir"
ynh_secure_remove --file="$install_dir"
mv "$tmpdir" "$install_dir"
ynh_secure_remove --file="$tmpdir"