mirror of
https://github.com/YunoHost-Apps/haste_ynh.git
synced 2024-09-03 20:36:28 +02:00
85 lines
2.2 KiB
Bash
Executable file
85 lines
2.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
final_path=$(ynh_app_setting_get $app final_path)
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# STOP AND REMOVE SERVICE
|
|
#=================================================
|
|
|
|
# Remove the dedicated systemd config
|
|
ynh_remove_systemd_config
|
|
|
|
#=================================================
|
|
# REMOVE SERVICE FROM ADMIN PANEL
|
|
#=================================================
|
|
|
|
if yunohost service status | grep -q $app
|
|
then
|
|
echo "Remove $app service"
|
|
yunohost service remove $app
|
|
fi
|
|
|
|
#=================================================
|
|
# REMOVE APP MAIN DIR
|
|
#=================================================
|
|
|
|
ynh_secure_remove "$final_path"
|
|
|
|
#=================================================
|
|
# REMOVE NGINX CONFIGURATION
|
|
#=================================================
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
#=================================================
|
|
# REMOVE LOGROTATE CONFIGURATION
|
|
#=================================================
|
|
|
|
ynh_remove_logrotate
|
|
|
|
#=================================================
|
|
# SPECIFIC REMOVE
|
|
#=================================================
|
|
# REMOVE HASTE BINARY
|
|
#=================================================
|
|
|
|
ynh_secure_remove "/usr/bin/$app"
|
|
|
|
#=================================================
|
|
# REMOVE DATADIR DIRECTORY
|
|
#=================================================
|
|
|
|
ynh_secure_remove "$data_path"
|
|
|
|
#=================================================
|
|
# REMOVE NODEJS
|
|
#=================================================
|
|
|
|
ynh_remove_nodejs
|
|
|
|
#=================================================
|
|
# GENERIC FINALIZATION
|
|
#=================================================
|
|
# REMOVE DEDICATED USER
|
|
#=================================================
|
|
|
|
# Delete a system user
|
|
ynh_system_user_delete $app
|