Skip to content

Commit

Permalink
Remove variable if it is ours
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul authored and Paul committed Jun 1, 2020
1 parent a1a100b commit 7ffda44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions uninstall
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/local/cpanel/3rdparty/bin/perl
use Config::Tiny;

unlink("/usr/local/cpanel/whostmgr/docroot/addon_plugins/ico-maldet.png");
unlink("/var/cpanel/apps/maldet.conf");
Expand All @@ -18,6 +19,14 @@ if ( -x '/usr/local/cpanel/bin/unregister_appconfig' ) {

system "/usr/local/cpanel/scripts/uninstall_plugin", "appconfig/maldet.tar.gz";

my $config = Config::Tiny->new;
my $config_file = "/usr/local/maldetect/conf.maldet.cron";
$config = Config::Tiny->read( $config_file );
if ($config->{_}->{'cron_custom_exec'} eq '/usr/local/cpanel/whostmgr/docroot/cgi/addons/maldet/custom.cron') {
delete $config->{_}->{'cron_custom_exec'};
$config->write( $config_file );
}

print "cPanel Linux Malware Detect uninstalled from WHM & cPanel.\n";
print "You will need to remove LMD manually\n";

Expand Down

0 comments on commit 7ffda44

Please sign in to comment.