1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00
This commit is contained in:
Éric Gaspar 2023-10-09 12:05:52 +02:00
parent 585c77c9ec
commit 1a2cf57074
2 changed files with 5 additions and 35 deletions

View file

@ -24,23 +24,6 @@ if ! yunohost app list | grep -q "id: $dex_app"; then
yunohost app install https://github.com/YunoHost-Apps/dex_ynh --force --args "domain=$dex_domain&path=$dex_path&OIDC_name=$oidc_name&OIDC_secret=$oidc_secret&OIDC_callback=$oidc_callback"
fi
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -54,7 +37,6 @@ chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE LOCAL STORAGE
#=================================================
ynh_script_progression --message="Restoring the app local storage..." --weight=1
ynh_restore_file --origin_path="/var/lib/outline"
@ -80,18 +62,6 @@ ynh_script_progression --message="Restoring the PostgreSQL database..." --weight
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
#=================================================
# UPDATING A CONFIGURATION
#=================================================
#REMOVEME? ynh_secure_remove --file="$install_dir/.env"
ynh_script_progression --message="Updating the configuration file..." --weight=1
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
#=================================================
# RESTORE SYSTEMD
#=================================================

View file

@ -33,13 +33,13 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_secure_remove --file="$final_path"
ynh_setup_source --dest_dir="$final_path"
ynh_secure_remove --file="$install_dir"
ynh_setup_source --dest_dir="$install_dir"
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=======================================================
# MIGRATE MINIO BUCKET IF UPGRADING FROM AN OLD VERSION