)
request.set_values(line_values)
+def handler(signum, frame):
+ set_line_values(
+ "/dev/gpiochip0",
+ { 4: Value.INACTIVE, # indicate 'not ready' to LPC
+ 16: Value.INACTIVE, # pyro off
+ 17: Value.INACTIVE, # alarm b off
+ 20: Value.INACTIVE, # turn continuity LED off
+ 21: Value.INACTIVE, # turn armed LED off
+ 27: Value.INACTIVE # alarm a off
+ }
+ )
+ sys.exit(0)
+
+# having systemd use SIGINT to avoid CherryPy consuming the kill signal
+signal.signal(signal.SIGINT, handler)
+
class Root(object):
@cherrypy.expose
'server.socket_port': 8080,
},
}
-
+
cherrypy.quickstart(Root(), '/', config)