1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/paheko_ynh.git synced 2024-09-03 19:56:22 +02:00

Update upgrade

This commit is contained in:
Éric Gaspar 2023-10-09 21:34:58 +02:00
parent 7cab77b43a
commit f7713ee230

View file

@ -31,7 +31,10 @@ fi
if [ -d "$install_dir/data" ]; then if [ -d "$install_dir/data" ]; then
ynh_print_warn "Migrating data directory to $data_dir..." ynh_print_warn "Migrating data directory to $data_dir..."
mv "$install_dir/data" "$data_dir"
# remove old configuration files
ynh_secure_remove --file="$install_dir/data/config.local.user.php"
mv "$install_dir/data" "$data_dir"
fi fi
#================================================= #=================================================
@ -45,6 +48,8 @@ then
ynh_setup_source --dest_dir="$install_dir" #--keep="config.local.php" ynh_setup_source --dest_dir="$install_dir" #--keep="config.local.php"
fi fi
ynh_secure_remove --file="$install_dir/config.local.yunohost.php"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
@ -70,10 +75,6 @@ chmod 644 "/etc/cron.d/$app"
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=5 ynh_script_progression --message="Updating a configuration file..." --weight=5
# remove old configuration files
ynh_secure_remove --file="$install_dir/config.local.user.php"
ynh_secure_remove --file="$install_dir/config.local.yunohost.php"
# Install configuration files # Install configuration files
ynh_add_config --template="../conf/config.local.php" --destination="$install_dir/config.local.php" ynh_add_config --template="../conf/config.local.php" --destination="$install_dir/config.local.php"