#!/usr/bin/python
import os
import shutil
def issue(s, p, m):
return "" +s+ "" +p+ "" +m+ ""
if os.getenv("_SETUP") is None:
print("ERROR: _SETUP environment variable is not set. This script should be called from ITRS Geneos Gateway Hooks.")
else:
source = os.getenv("_SETUP")
destination = '/tmp/gwhooks'
try:
os.mkdir(destination)
except OSError:
pass
shutil.copy(source, destination)
print ""
print issue("None", "/gateway", "The gateway XML merged with include files have been copied from " + source + " to " + destination)
print ""