1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/baikal_ynh.git synced 2024-09-03 18:16:11 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2022-04-04 21:12:23 +02:00
parent b7632a5897
commit 2ab33c2736
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -117,25 +117,25 @@ ynh_add_fpm_config
# UPGRADE BAIKAL # UPGRADE BAIKAL
#================================================= #=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ] # if [ "$upgrade_type" == "UPGRADE_APP" ]
then # then
#================================================= # #=================================================
# UPGRADE BAIKAL CONFIGURATION # # UPGRADE BAIKAL CONFIGURATION
#================================================= # #=================================================
ynh_script_progression --message="Upgrading the configuration file..." --weight=2 # ynh_script_progression --message="Upgrading the configuration file..." --weight=2
if [ -z "$password_hash" ]; then # if [ -z "$password_hash" ]; then
password=$(ynh_app_setting_get --app=$app --key=password) # password=$(ynh_app_setting_get --app=$app --key=password)
password_hash=$(echo -n admin:BaikalDAV:$password | md5sum | cut -d ' ' -f 1) # password_hash=$(echo -n admin:BaikalDAV:$password | md5sum | cut -d ' ' -f 1)
ynh_app_setting_set --app=$app --key=password_hash --value=$password_hash # ynh_app_setting_set --app=$app --key=password_hash --value=$password_hash
fi # fi
timezone=$(cat /etc/timezone) # timezone=$(cat /etc/timezone)
path=${path_url%/} # path=${path_url%/}
ynh_add_config --template="../conf/baikal.yaml" --destination="$final_path/config/baikal.yaml" # ynh_add_config --template="../conf/baikal.yaml" --destination="$final_path/config/baikal.yaml"
chown $app: "$final_path/config/baikal.yaml" # chown $app: "$final_path/config/baikal.yaml"
chmod 640 "$final_path/config/baikal.yaml" # chmod 640 "$final_path/config/baikal.yaml"
fi # fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX