mirror of
https://github.com/YunoHost-Apps/opensondage_ynh.git
synced 2024-09-03 19:46:28 +02:00
Update upgrade
This commit is contained in:
parent
8a9b67fe22
commit
bf7f8d8437
1 changed files with 6 additions and 14 deletions
|
@ -25,14 +25,9 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=2
|
ynh_script_progression --message="Upgrading source files..." --weight=2
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep="app/inc/config.php"
|
ynh_setup_source --dest_dir="$install_dir" --keep="app/inc/config.php"
|
||||||
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"
|
||||||
|
@ -53,15 +48,12 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|
||||||
then
|
|
||||||
ynh_script_progression --message="Updating a configuration file..." --weight=2
|
ynh_script_progression --message="Updating a configuration file..." --weight=2
|
||||||
|
|
||||||
ynh_add_config --template="config.php" --destination="$install_dir/app/inc/config.php"
|
ynh_add_config --template="config.php" --destination="$install_dir/app/inc/config.php"
|
||||||
|
|
||||||
chmod 400 "$install_dir/app/inc/config.php"
|
chmod 400 "$install_dir/app/inc/config.php"
|
||||||
chown $app:$app "$install_dir/app/inc/config.php"
|
chown $app:$app "$install_dir/app/inc/config.php"
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REPLACE LOGO IMAGE (DEFAULT IS FRAMADATE)
|
# REPLACE LOGO IMAGE (DEFAULT IS FRAMADATE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue