gracedman
Jr. Member
Offline
Gender:
Posts: 4
|
|
« on: Friday 08 June 2012, 02:17:26 am » |
|
Hello, all. We are working on integrating Endian with the ISCS network security framework (iscs.sourceforge.net) and are having some difficulty restarting processes from the command line with the new python based parallel boot scripts. Specifically, we need to either restart the firewall using the /usr/lib/python/site-packages/endian/restartscripts/firewall.py script or ipac using /usr/lib/python/site-packages/endian/job/start/ipac.py script. How does one do that?
Since it uses the job engine, I don't think I can just do python /usr/lib/python/site-packages/endian/restartscripts/firewall.py restart. I tried creating a script to call the job engine: from optparse import OptionParser from endian.job.engine_control import send_cmd_to_engine
def main(): usage = "usage: %prog <options>" parser = OptionParser(usage) parser.add_option("-d", "--debug", dest="debug", action="store_true", help="Be more verbose", default=False) parser.add_option("-f", "--force", dest="force", action="store_true", help="Forces restart", default=False) parser.add_option("-e", "--enable", dest="enable", action="store_true", help="enable SSH server", default=False) (options, args) = parser.parse_args()
send_cmd_to_engine("restart firewall", options=options)
if __name__ == "__main__": main()
but that didn't work either. Thanks - John PS - as you can probably tell, I am a complete Python ignoramus!
|