17 lines
397 B
Python
17 lines
397 B
Python
#!/usr/bin/env python3
|
|
from sdnotify import SystemdNotifier
|
|
from asyncio import get_event_loop
|
|
from risotto import get_app
|
|
|
|
|
|
if __name__ == '__main__':
|
|
notifier = SystemdNotifier()
|
|
loop = get_event_loop()
|
|
loop.run_until_complete(get_app(loop))
|
|
print('HTTP server ready')
|
|
notifier.notify("READY=1")
|
|
try:
|
|
loop.run_forever()
|
|
except KeyboardInterrupt:
|
|
pass
|