-
Notifications
You must be signed in to change notification settings - Fork 147
/
igniteDumpsterFire.py
58 lines (47 loc) · 1.48 KB
/
igniteDumpsterFire.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/python
#
# Filename: igniteDumsterFire.py
#
# Version: 1.0.0
#
# Author: Joe Gervais (TryCatchHCF)
#
# Summary:
#
# Script for launching a DumpsterFire in "headless" mode, with no user
# interaction. Useful for launching standalone, coordinated DumpsterFires
# across multiple systems.
#
# Description:
#
# Takes name of DumpsterFire, loads associated settings file, proceeds to
# execute component Fires. If time delay trigger has been set, will idle
# until target time arrives. Executes each Fire module in sequence, starting
# the next Fire once the previous Fire has exited. Checks for time delta
# triggers for each Fire, delays execution as configured.
#
# Check settings of your DumpsterFire prior to using this script, since
# you won't get any second chances to confirm, verify any datetime-delayed
# triggers, etc.
#
#
# Example:
#
# $ ./igniteDumpsterFire.py my_dumpsterfire.fyr
#
import os, sys, getopt, dumpsterFireFactory
def IgniteDumpsterFireHeadless( dumpsterFireName ):
# Load the named Dumpster Fire
hotDumpsterFire = dumpsterFireFactory.LoadDumpsterFireConfig( dumpsterFireName )
dumpsterFireFactory.IgniteDumpsterFire( hotDumpsterFire, hotDumpsterFire.mLaunchDateTimeUTC, False )
return
if __name__ == "__main__":
if ( len(sys.argv) != 2 ):
print ""
print "usage: igniteDumpsterFire.py <DumpsterFireName>"
print ""
print "Example: ./igniteDumpsterFire.py my_dumpsterfire.fyr"
print ""
exit
else:
IgniteDumpsterFireHeadless( sys.argv[ 1 ])