mirror of
https://github.com/YunoHost-Apps/monitorix_ynh.git
synced 2024-09-03 19:46:06 +02:00
41 lines
912 B
Bash
Executable file
41 lines
912 B
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Import common cmd
|
|
source ./experimental_helper.sh
|
|
source ./_common.sh
|
|
|
|
# Retrieve app settings
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
|
|
# Stop service
|
|
systemctl stop monitorix.service
|
|
|
|
# Drop MySQL database and user
|
|
dbname=$app
|
|
dbuser=$app
|
|
ynh_mysql_drop_db "$dbname" || true
|
|
ynh_mysql_drop_user "$dbuser" || true
|
|
|
|
# Remove data
|
|
ynh_secure_remove /var/lib/monitorix
|
|
|
|
# Remove nginx config
|
|
ynh_secure_remove "/etc/nginx/conf.d/monitorix_status.conf"
|
|
ynh_remove_nginx_config
|
|
|
|
# Autoremove package
|
|
ynh_remove_app_dependencies
|
|
ynh_package_autoremove monitorix
|
|
|
|
yunohost service remove monitorix
|