Subversion Repositories camp_sysinfo_client_3

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8 rodolico 1
#! /usr/bin/perl -w
2
 
11 rodolico 3
# an extremely basic installer for sysinfo-client
9 rodolico 4
 
11 rodolico 5
for $dir ( '/opt/camp/sysinfo', '/opt/camp/sysinfo/modules', '/opt/camp/sysinfo/scripts', '/etc/camp', '/etc/camp/usermodules' ) {
6
   `mkdir -p $dir`;
7
   `chmod 0700 $dir`;
8
   `chown root:root $dir`;
10 rodolico 9
}
8 rodolico 10
 
11 rodolico 11
for $dir ( 'modules', 'scripts' ) {
12
   `cp -av $dir/* /opt/camp/sysinfo/$dir/`;
13
   `chmod 0700 /opt/camp/sysinfo/$dir/*` if $dir eq 'scripts';
14
   `chown root:root /opt/camp/sysinfo/$dir/*`;
10 rodolico 15
}
16
 
12 rodolico 17
for $file ( 'sysinfo-client','notes', 'sysinfo-client.conf.template','configure.pl' ) {
11 rodolico 18
   `cp $file /opt/camp/sysinfo/`;
12 rodolico 19
   `chmod 0600 /opt/camp/sysinfo/$file`;
11 rodolico 20
   `chown root:root /opt/camp/sysinfo/$file`;
8 rodolico 21
}
22
 
11 rodolico 23
# Create a link into /usr/local/bin
12 rodolico 24
`chmod 0700 /opt/camp/sysinfo/sysinfo-client`;
25
`chmod 0700 /opt/camp/sysinfo/configure.pl`;
11 rodolico 26
`ln -s /opt/camp/sysinfo/sysinfo-client /usr/local/bin/sysinfo-client`;
8 rodolico 27
 
11 rodolico 28
`configure.pl`;
8 rodolico 29
 
30
1;