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