#!/usr/bin/bash

PERL_BIN='/usr/local/cpanel/3rdparty/bin/perl'

VC_PLUGIN_DIR=/var/cpanel/plugins/monitoring
PLUGINS_RESOURCES_DIR=/usr/local/cpanel/whostmgr/docroot/addon_plugins

# Remove plugin files.
/bin/rm -f $PLUGINS_RESOURCES_DIR/whm-360-monitoring.svg

# Unregister the plugin from AppConfig.
/usr/local/cpanel/bin/unregister_appconfig $VC_PLUGIN_DIR/whm-360-monitoring.conf

# rename the config files
$PERL_BIN -e 'use Whostmgr::360Monitoring::Setup(); Whostmgr::360Monitoring::Setup::disable_user_config()'|| true
