1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/signaturepdf_ynh.git synced 2024-09-03 20:25:57 +02:00

Improve digital signature upgrade

This commit is contained in:
tituspijean 2024-08-03 20:01:31 +02:00
parent 79d9189cda
commit a8f974828d
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -14,14 +14,18 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." ynh_script_progression --message="Ensuring downward compatibility..."
if [ -z ${nss3_nick:-} ]; then if ynh_compare_current_package_version --comparison lt --version 1.7.0~ynh2
nss3_nick="" then
ynh_app_setting_set --app=$app --key=nss3_nick --value="" nss3_nick="SignaturePDF"
fi ynh_app_setting_set --app=$app --key=nss3_nick --value=$nss3_nick
if [ -z ${nss3_password:-} ]; then
nss3_password=$(ynh_string_random) nss3_password=$(ynh_string_random)
ynh_app_setting_set --app=$app --key=nss3_password --value=$nss3_password ynh_app_setting_set --app=$app --key=nss3_password --value=$nss3_password
echo "# Digital signature configuration
NSS3_DIRECTORY=$data_dir/nss/
NSS3_PASSWORD=$nss3_password
NSS3_NICK=$nss3_nick
" >> $install_dir/config/config.ini
fi fi
#================================================= #=================================================
@ -29,7 +33,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# 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" --keep="config/config.ini" ynh_setup_source --dest_dir="$install_dir" --keep="config/config.ini"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"