mirror of
https://github.com/YunoHost-Apps/svgedit_ynh.git
synced 2024-09-03 20:26:24 +02:00
41 lines
1 KiB
Bash
Executable file
41 lines
1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
source ../settings/scripts/_common.sh
|
|
|
|
# Exit if an error occurs during the execution of the script
|
|
ynh_abort_if_errors
|
|
|
|
export app=$YNH_APP_INSTANCE_NAME
|
|
|
|
# Retrieve old app settings
|
|
ynh_get_and_export domain path_url is_public final_path
|
|
|
|
# Normalize the url path syntax
|
|
path_url=$(ynh_normalize_url_path $path_url)
|
|
|
|
# Check web path availability
|
|
ynh_webpath_available $domain $path_url
|
|
# Check if the app can be installed with this args
|
|
ynh_final_path_available
|
|
|
|
# Install dependency
|
|
ynh_install_app_dependencies $pkg_dependencies
|
|
|
|
# Restore sources & data
|
|
ynh_restore
|
|
|
|
# Restore permissions to app files
|
|
ynh_set_default_perm "$final_path"
|
|
|
|
# If app is public, add url to SSOWat conf as skipped_uris
|
|
ynh_sso_access "/"
|
|
|
|
# Restart webserver
|
|
systemctl reload nginx
|
|
|
|
# Send message to the admin
|
|
message="If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/svgedit_ynh"
|
|
|
|
ynh_send_readme_to_admin "$message"
|