lookyloo/bin/start.py

25 lines
525 B
Python
Raw Normal View History

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
2020-10-22 16:41:00 +02:00
from subprocess import run, Popen
from lookyloo.helpers import get_homedir
def main():
# Just fail if the env isn't set.
get_homedir()
2020-10-22 16:41:00 +02:00
print('Start backend (redis)...')
p = run(['run_backend', '--start'])
p.check_returncode()
print('done.')
print('Start asynchronous ingestor...')
2020-11-05 14:14:33 +01:00
Popen(['async_capture'])
2020-10-22 16:41:00 +02:00
print('done.')
print('Start website...')
Popen(['start_website'])
2020-10-22 16:41:00 +02:00
print('done.')
if __name__ == '__main__':
main()