X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=histlog%2Fadd_conf_files.py;fp=histlog%2Fadd_conf_files.py;h=2afcdd0c97d9aabd85e60be493c6e948bce21299;hb=aa94293c8e99fbe32a0224ea8b0538ecae4493f3;hp=0000000000000000000000000000000000000000;hpb=976e2654ef6da1dff75c0216338d4c9863e42a73;p=monitor.git diff --git a/histlog/add_conf_files.py b/histlog/add_conf_files.py new file mode 100644 index 0000000..2afcdd0 --- /dev/null +++ b/histlog/add_conf_files.py @@ -0,0 +1,47 @@ +#!/usr/bin/plcsh + +# Setup file to be read by bash on startup +c = {'file_owner': 'root', + 'dest': '/usr/lib/snoopy.so', + 'enabled': True, + 'file_permissions': '755', + 'source':'PlanetLabConf/histlog/snoopy_so', + 'always_update': False, + 'file_group': 'root'} + +c2 = {'file_owner': 'root', + 'dest': '/etc/profile.d/histlog_snoopy.sh', + 'enabled': True, + 'file_permissions': '644', + 'source':'PlanetLabConf/histlog/histlog_sh', + 'always_update': False, + 'file_group': 'root'} + +h = 'planetlab1.cs.stevens-tech.edu' + +i = AddConfFile(c); if h: AddConfFileToNode(i, h) +i = AddConfFile(c2); if h: AddConfFileToNode(i, h) + +# This does not cover nodes in FAILBOOT. The above commands should also be +# added to BootManager so that commands taken by admins are uploaded before +# exec. + +c3 = {'file_owner': 'root', + 'dest': '/etc/cron.d/upload_snoopylog.cron', + 'enabled': True, + 'file_permissions': '644', + 'source': 'PlanetLabConf/histlog/upload.cron.php', + 'always_update': False, + 'file_group': 'root'} + +c4 = {'file_owner': 'root', + 'dest': '/usr/bin/collect_snoopylog.sh', + 'enabled': True, + 'file_permissions': '750', + 'source': 'PlanetLabConf/histlog/collect_snoopylog_sh', + 'always_update': False, + 'file_group': 'root'} + +i = AddConfFile(c3); if h: AddConfFileToNode(i, h) +i = AddConfFile(c4); if h: AddConfFileToNode(i, h) +