updates to values sent to rest set_node_service

This commit is contained in:
Blake J. Harnden 2018-08-16 16:54:44 -07:00
parent bf6353f168
commit 60ceba876d

View file

@ -601,14 +601,11 @@ def set_node_service(session_id, node_id, service_name):
# guarantee custom service exists # guarantee custom service exists
session.services.set_service(node_id, service_name) session.services.set_service(node_id, service_name)
service = session.services.get_service(node_id, service_name) service = session.services.get_service(node_id, service_name)
startup = data["startup"] or "" service.startup = tuple(data["cmdup"])
service.startup = tuple(startup.split("\n"))
logger.info("custom startup: %s", service.startup) logger.info("custom startup: %s", service.startup)
validate = data["validate"] or "" service.validate = tuple(data["cmdval"])
service.validate = tuple(validate.split("\n"))
logger.info("custom validate: %s", service.validate) logger.info("custom validate: %s", service.validate)
shutdown = data["shutdown"] or "" service.shutdown = tuple(data["cmddown"])
service.shutdown = tuple(shutdown.split("\n"))
logger.info("custom shutdown: %s", service.shutdown) logger.info("custom shutdown: %s", service.shutdown)
return jsonify() return jsonify()