1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00

Update remove

This commit is contained in:
frju365 2019-01-05 20:42:54 +01:00 committed by GitHub
parent d8dc01d6c2
commit c279159501
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,9 +14,10 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
port=$(ynh_app_setting_get $app port)
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
final_path=$(ynh_app_setting_get $app final_path)
#================================================= #=================================================
# STANDARD REMOVE # STANDARD REMOVE
@ -24,15 +25,17 @@ domain=$(ynh_app_setting_get $app domain)
# STOP AND REMOVE SERVICE # STOP AND REMOVE SERVICE
#================================================= #=================================================
# Remove the dedicated systemd config
ynh_remove_systemd_config ynh_remove_systemd_config
#================================================= #=================================================
# DISABLE SERVICE IN ADMIN PANEL # REMOVE SERVICE FROM ADMIN PANEL
#================================================= #=================================================
if yunohost service status | grep -q $app # Check if service is declared in YunoHost # Remove a service from the admin panel, added by `yunohost service add`
if yunohost service status | grep -q $app
then then
ynh_print_info "Remove $app service" >&2 echo "Remove $app service"
yunohost service remove $app yunohost service remove $app
fi fi
@ -43,10 +46,18 @@ fi
ynh_remove_nodejs ynh_remove_nodejs
#================================================= #=================================================
# REMOVE THE MAIN DIR OF THE APP # REMOVE APP MAIN DIR
#================================================= #=================================================
ynh_secure_remove "/var/www/$app" # Remove the app directory securely # Remove the app directory securely
ynh_secure_remove "$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
# Remove the dedicated nginx config
ynh_remove_nginx_config
#================================================= #=================================================
# REMOVE THE NGINX CONFIGURATION # REMOVE THE NGINX CONFIGURATION