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:
parent
79d9189cda
commit
a8f974828d
1 changed files with 11 additions and 7 deletions
|
@ -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"
|
||||||
|
|
Loading…
Add table
Reference in a new issue