add a directory for running nagios scale/performance tests
[monitor.git] / nagios / actions / reboot.py
1 #!/usr/bin/python
2
3 #from monitor.reboot import *
4 import sys
5 import time
6
7 def main():
8         #try:
9         #       if "test" in sys.argv:
10         #               dryrun = True
11         #       else:
12         #               dryrun = False
13 #
14 #               for node in sys.argv[1:]:
15 #                       if node == "test": continue
16 #
17 #                       print "Rebooting %s" % node
18 #                       if reboot_policy(node, True, dryrun):
19 #                               print "success"
20 #                       else:
21 #                               print "failed"
22 #       except Exception, err:
23 #               import traceback; traceback.print_exc()
24 #               from monitor.common import email_exception
25 #               email_exception(node)
26 #               print err
27     return 
28
29 if __name__ == '__main__':
30         #main()
31         f = open("/tmp/reboot", 'a')
32         f.write("reboot %s %s\n" % (time.time(), " ".join(sys.argv[1:])))
33         f.close()