mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
Update upgrade
This commit is contained in:
parent
57e8d5c04e
commit
e48cd535d2
1 changed files with 86 additions and 99 deletions
|
@ -9,12 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -64,13 +58,10 @@ fi
|
||||||
# Get the current version of roundcube
|
# Get the current version of roundcube
|
||||||
oldversion=$(grep RCMAIL_VERSION "$install_dir/program/include/iniset.php" | cut -d\' -f4)
|
oldversion=$(grep RCMAIL_VERSION "$install_dir/program/include/iniset.php" | cut -d\' -f4)
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
fi
|
|
||||||
|
|
||||||
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"
|
||||||
|
@ -91,13 +82,10 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE ROUNDCUBE
|
# CONFIGURE ROUNDCUBE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reconfiguring $app..." --weight=1
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|
||||||
then
|
|
||||||
ynh_script_progression --message="Reconfiguring Roundcube..." --weight=1
|
|
||||||
|
|
||||||
deskey=$(ynh_string_random --length=24)
|
deskey=$(ynh_string_random --length=24)
|
||||||
ynh_add_config --template="../conf/config.inc.php" --destination="$install_dir/config/config.inc.php"
|
ynh_add_config --template="config.inc.php" --destination="$install_dir/config/config.inc.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE DEPENDENCIES WITH COMPOSER
|
# UPDATE DEPENDENCIES WITH COMPOSER
|
||||||
|
@ -138,7 +126,7 @@ then
|
||||||
|
|
||||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
||||||
|
|
||||||
ynh_add_config --template="../conf/enigma.config.inc.php" --destination="$install_dir/plugins/enigma/config.inc.php"
|
ynh_add_config --template="enigma.config.inc.php" --destination="$install_dir/plugins/enigma/config.inc.php"
|
||||||
mkdir -p "$install_dir/plugins/enigma/home"
|
mkdir -p "$install_dir/plugins/enigma/home"
|
||||||
chown -R $app:$app "$install_dir/plugins/enigma/home"
|
chown -R $app:$app "$install_dir/plugins/enigma/home"
|
||||||
|
|
||||||
|
@ -202,7 +190,6 @@ then
|
||||||
|
|
||||||
COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn "php$phpversion" ./bin/update.sh --version=$oldversion -y
|
COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn "php$phpversion" ./bin/update.sh --version=$oldversion -y
|
||||||
popd
|
popd
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue