run daily, with collection log script
[monitor.git] / histlog / add_conf_files.py
1 #!/usr/bin/plcsh 
2
3 # Setup file to be read by bash on startup
4 c = {'file_owner': 'root', 
5         'dest': '/usr/lib/snoopy.so',
6         'enabled': True, 
7         'file_permissions': '755',
8         'source':'PlanetLabConf/histlog/snoopy_so', 
9         'always_update': False,
10         'file_group': 'root'}
11
12 c2 = {'file_owner': 'root', 
13         'dest': '/etc/profile.d/histlog_snoopy.sh',
14         'enabled': True, 
15         'file_permissions': '644',
16         'source':'PlanetLabConf/histlog/histlog_sh', 
17         'always_update': False,
18         'file_group': 'root'}
19
20 h = 'planetlab1.cs.stevens-tech.edu'
21
22 i = AddConfFile(c);  if h: AddConfFileToNode(i, h)
23 i = AddConfFile(c2); if h: AddConfFileToNode(i, h)
24
25 # This does not cover nodes in FAILBOOT.  The above commands should also be
26 # added to BootManager so that commands taken by admins are uploaded before
27 # exec.
28
29 c3 = {'file_owner': 'root', 
30         'dest': '/etc/cron.d/upload_snoopylog.cron', 
31         'enabled': True,
32         'file_permissions': '644', 
33         'source': 'PlanetLabConf/histlog/upload.cron.php', 
34         'always_update': False,
35         'file_group': 'root'}
36
37 c4 = {'file_owner': 'root', 
38         'dest': '/usr/bin/collect_snoopylog.sh', 
39         'enabled': True,
40         'file_permissions': '750', 
41         'source': 'PlanetLabConf/histlog/collect_snoopylog_sh', 
42         'always_update': False,
43         'file_group': 'root'}
44
45 i = AddConfFile(c3);  if h: AddConfFileToNode(i, h)
46 i = AddConfFile(c4);  if h: AddConfFileToNode(i, h)
47