Subversion Repositories camp_sysinfo_client_3

Rev

Rev 21 | Blame | Last modification | View Log | RSS feed

#!/usr/bin/env perl

use warnings;
use strict;  

our $VERSION = '1.1';

# find our location and use it for searching for libraries
BEGIN {
   use FindBin;
   use File::Spec;
   use lib File::Spec->catdir($FindBin::Bin);
}

use sysinfoconf;

# an extremely basic uninstaller for sysinfo-client


&processParameters( @ARGV );


if ( &yesno( "I am getting ready to remove sysinfo-client from the system\nOk?" ) ) {
   my $removeConfig = &yesno( "Do you want me to remove the configuration also?" );
   print "Uninstalling ";
   print "and removing config" if $removeConfig;
   `rm -fRv $binDir`;
   `rm -fRv $confDir` if $removeConfig;
   unlink(  '/etc/fcron.daily/sysinfo.cron',
            '/etc/cron.daily/sysinfo',
            '/usr/local/bin/sysinfo-client' 
          );
   print "\nStandard sysinfo-client removed\n";
} else {
   print "Uninstalled aborted\n"
}

exit 1;