Subversion Repositories camp_sysinfo_client_3

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16 rodolico 1
#!/usr/bin/env perl
2
 
3
use warnings;
4
 
21 rodolico 5
$main::VERSION = '1.1';
20 rodolico 6
 
21 rodolico 7
# find our location and use it for searching for libraries
8
BEGIN {
9
   use FindBin;
10
   use File::Spec;
11
   use lib File::Spec->catdir($FindBin::Bin);
12
}
16 rodolico 13
 
21 rodolico 14
use sysinfoconf;
16 rodolico 15
 
21 rodolico 16
# an extremely basic uninstaller for sysinfo-client
16 rodolico 17
 
18
 
20 rodolico 19
&processParameters( @ARGV );
20
 
21
 
16 rodolico 22
if ( &yesno( "I am getting ready to remove sysinfo-client from the system\nOk?" ) ) {
23
   my $removeConfig = &yesno( "Do you want me to remove the configuration also?" );
24
   print "Uninstalling ";
25
   print "and removing config" if $removeConfig;
21 rodolico 26
   `rm -fRv $binDir`;
16 rodolico 27
   `rm -fRv $confDir` if $removeConfig;
18 rodolico 28
   unlink(  '/etc/fcron.daily/sysinfo.cron',
29
            '/etc/cron.daily/sysinfo',
30
            '/usr/local/bin/sysinfo-client' 
31
          );
32
   print "\nStandard sysinfo-client removed\n";
16 rodolico 33
} else {
34
   print "Uninstalled aborted\n"
35
}
36
 
37
exit 1;
38