mirror of
https://github.com/YunoHost-Apps/signaturepdf_ynh.git
synced 2024-09-03 20:25:57 +02:00
49 lines
1.5 KiB
Bash
49 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M
|
|
|
|
#=================================================
|
|
# ENSURE DOWNWARD COMPATIBILITY
|
|
#=================================================
|
|
ynh_script_progression --message="Ensuring downward compatibility..."
|
|
|
|
if ynh_compare_current_package_version --comparison lt --version 1.7.0~ynh2
|
|
then
|
|
nss3_nick="SignaturePDF"
|
|
ynh_app_setting_set --app=$app --key=nss3_nick --value=$nss3_nick
|
|
nss3_password=$(ynh_string_random)
|
|
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
|
|
ynh_store_file_checksum --file="$install_dir/config/config.ini"
|
|
fi
|
|
|
|
#=================================================
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
#=================================================
|
|
ynh_script_progression "Upgrading source files..."
|
|
|
|
ynh_setup_source --dest_dir="$install_dir" --keep="config/config.ini"
|
|
|
|
#=================================================
|
|
# NGINX CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression "Upgrading system configurations related to $app..."
|
|
|
|
ynh_config_add_nginx
|
|
|
|
ynh_config_add_phpfpm
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression "Upgrade of $app completed"
|