mirror of
https://github.com/YunoHost-Apps/invidious_ynh.git
synced 2024-09-03 19:15:55 +02:00
Update upgrade
This commit is contained in:
parent
055fa5a366
commit
b3c1bc90df
1 changed files with 12 additions and 5 deletions
|
@ -81,7 +81,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=8
|
|||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
|
||||
tempdir="$(mktemp -d)"
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id=crystal
|
||||
ynh_exec_warn_less dpkg -i $tempdir/crystal_1.0.0-1_amd64.deb
|
||||
|
@ -94,10 +93,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
#tmpdir="$(mktemp -d)"
|
||||
|
||||
# Backup the config file in the temp dir
|
||||
cp -a "$final_path/config/config.yml" "$tmpdir/config.yml"
|
||||
#cp -a "$final_path/config/config.yml" "$tmpdir/config.yml"
|
||||
|
||||
# Remove the app directory securely
|
||||
#ynh_secure_remove --file=$final_path
|
||||
|
@ -110,10 +109,10 @@ then
|
|||
popd
|
||||
|
||||
# Copy the admin saved settings from tmp directory to final path
|
||||
cp -a "$tmpdir/config.yml" "$final_path/config/config.yml"
|
||||
#cp -a "$tmpdir/config.yml" "$final_path/config/config.yml"
|
||||
|
||||
# Remove the tmp directory securely
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
#ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
@ -129,6 +128,14 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..."
|
||||
|
||||
ynh_add_config --template="../conf/config.yml" --destination="$final_path/config/config.yml"
|
||||
chmod 600 $final_path/config/config.yml
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue