Update index.py
This commit is contained in:
parent
2da9b59ae9
commit
15096e7954
|
|
@ -110,10 +110,18 @@ def initDreplace():
|
|||
init_file = getServerDir() + '/init.pl'
|
||||
if not os.path.exists(init_file):
|
||||
initAgentConf()
|
||||
|
||||
openPort()
|
||||
mw.writeFile(init_file, 'ok')
|
||||
return True
|
||||
|
||||
def openPort():
|
||||
try:
|
||||
import firewall_api
|
||||
firewall_api.firewall_api().addAcceptPortArgs('10050', 'zabbix-agent', 'port')
|
||||
return port
|
||||
except Exception as e:
|
||||
return "Release failed {}".format(e)
|
||||
return True
|
||||
|
||||
def zOp(method):
|
||||
|
||||
|
|
@ -126,6 +134,7 @@ def zOp(method):
|
|||
|
||||
|
||||
def start():
|
||||
|
||||
return zOp('start')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue