mirror of
https://github.com/YunoHost-Apps/horde_ynh.git
synced 2024-09-03 19:16:08 +02:00
76 lines
2.5 KiB
Bash
Executable file
76 lines
2.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# CHECK VERSION
|
|
#=================================================
|
|
|
|
upgrade_type=$(ynh_check_app_version_changed)
|
|
|
|
#=================================================
|
|
# PHP-FPM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
|
|
|
|
# Create a dedicated PHP-FPM config
|
|
ynh_add_fpm_config
|
|
|
|
# Create a dedicated NGINX config
|
|
config_nginx
|
|
|
|
#=================================================
|
|
# SPECIFIC UPGRADE
|
|
#=================================================
|
|
# UPGRADE SOURCE FILE
|
|
#=================================================
|
|
ynh_script_progression --message="Upgrading source files..." --weight=6
|
|
|
|
pear_cmd="$install_dir/pear/pear -c $install_dir/pear.conf"
|
|
$pear_cmd channel-update pear.horde.org
|
|
$pear_cmd upgrade -R $install_dir -a -B -c pear.horde.org || true
|
|
|
|
#=================================================
|
|
# PATCH APPLICATION
|
|
#=================================================
|
|
ynh_script_progression --message="Patching application..." --weight=7
|
|
|
|
patch_app
|
|
|
|
#=================================================
|
|
# CONFIGURE HORDE
|
|
#=================================================
|
|
ynh_script_progression --message="Configuring application..." --weight=3
|
|
|
|
config_horde
|
|
|
|
#=================================================
|
|
# SECURE FILES AND DIRECTORIES
|
|
#=================================================
|
|
ynh_script_progression --message="Protecting directory..."
|
|
|
|
set_permission
|
|
|
|
#=================================================
|
|
# GENERIC FINALIZATION
|
|
#=================================================
|
|
# SETUP LOGROTATE
|
|
#=================================================
|
|
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
|
|
|
|
ynh_use_logrotate --logfile="$install_dir/horde" --nonappend --specific_user www-data/horde
|
|
ynh_use_logrotate --logfile="$install_dir/horde/services" --specific_user www-data/horde
|
|
ynh_use_logrotate --logfile="$install_dir/horde/services/portal" --specific_user www-data/horde
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Upgrade of $app completed" --last
|