mirror of
https://github.com/YunoHost-Apps/monitorix_ynh.git
synced 2024-09-03 19:46:06 +02:00
28 lines
520 B
Bash
Executable file
28 lines
520 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Import common cmd
|
|
source ./_common.sh
|
|
|
|
# Init script
|
|
init_script
|
|
|
|
# Retrieve app settings
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
# Stop service
|
|
sudo service monitorix stop || true
|
|
|
|
# Remove nginx configuration file
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
# Drop MySQL database and user
|
|
dbname=$app
|
|
dbuser=$app
|
|
ynh_mysql_drop_db "$dbname" || true
|
|
ynh_mysql_drop_user "$dbuser" || true
|
|
|
|
# Autoremove package
|
|
ynh_package_autoremove monitorix
|
|
|
|
# Reload nginx service
|
|
sudo service nginx reload
|