Welcome, Guest. Please login or register.
Did you miss your activation email?
Wednesday 20 November 2024, 06:25:17 am

Login with username, password and session length

Get the new Updates directly from Endian  HERE
14258 Posts in 4377 Topics by 6515 Members
Latest Member: hulteends
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  General Support
| | |-+  Restart service from command line in 2.5.1
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Restart service from command line in 2.5.1  (Read 15177 times)
gracedman
Jr. Member
*
Offline Offline

Gender: Male
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!
Logged
gracedman
Jr. Member
*
Offline Offline

Gender: Male
Posts: 4



« Reply #1 on: Friday 08 June 2012, 07:53:40 am »

jobcontrol request firewall.reload
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.063 seconds with 18 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com