/[BackupPC]/trunk/xls2conf/Makefile
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/xls2conf/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by dpavlin, Mon Jul 11 16:22:50 2005 UTC revision 244 by dpavlin, Fri Dec 2 13:20:43 2005 UTC
# Line 1  Line 1 
1  all:      backuppc_data=/data/backuppc/data/
2    xls_file=analitika.xls
3    ip_range='(10.210.10[01]|10.42.101)'
4    
5    all:
6            @echo "usage: make [agi|qc]"
7    
8    agi:
9            sudo make convert backuppc_data=/data/backuppc-agi/data xls_file=agi.xls ip_range='(10.210.100)'
10            sudo /etc/init.d/backuppc-agi restart
11    
12    qc:
13            sudo make convert backuppc_data=/data/backuppc-qc/data xls_file=qc.xls ip_range='(10.210.101|10.42.101)'
14            sudo /etc/init.d/backuppc-qc restart
15    
16    convert:
17            echo "using $(xls_file) to dir $(backuppc_data)"
18    
19          test -d conf || mkdir conf          test -d conf || mkdir conf
20          rm conf/* || true          rm conf/* || true
21          ./xls2conf.pl analitika.xls          ./xls2conf.pl $(xls_file)
22          cp -f Makefile.install conf/Makefile  
23          rsync -rav conf/ 10.210.99.1:conf/          grep -v asa $(backuppc_data)/conf/hosts > conf/hosts.backuppc.orig
24            cat conf/hosts.backuppc.orig conf/hosts.backuppc > conf/hosts.backuppc.new
25    
26            cat /etc/hosts | egrep -v "$(ip_range)" > conf/hosts.orig
27            cat conf/hosts.orig conf/hosts.add > conf/hosts.new
28    
29    
30            mv $(backuppc_data)/conf/hosts $(backuppc_data)/conf/hosts.bak
31            mv conf/hosts.backuppc.new $(backuppc_data)/conf/hosts
32            mv /etc/hosts /etc/hosts.bak
33            mv conf/hosts.new /etc/hosts
34    
35            cp conf/*.pl $(backuppc_data)/conf/
36    

Legend:
Removed from v.23  
changed lines
  Added in v.244

  ViewVC Help
Powered by ViewVC 1.1.26