2019-01-29 18:37:13 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2020-10-22 16:41:00 +02:00
|
|
|
from subprocess import run, Popen
|
2021-08-24 17:10:14 +02:00
|
|
|
from lookyloo.helpers import get_homedir, get_config, reload_uuids_index
|
2019-01-29 18:37:13 +01:00
|
|
|
|
2020-10-03 21:19:43 +02:00
|
|
|
|
|
|
|
def main():
|
2019-01-29 18:37:13 +01:00
|
|
|
# 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.')
|
2021-08-24 17:10:14 +02:00
|
|
|
print('Reload UUIDs index...')
|
|
|
|
reload_uuids_index()
|
|
|
|
print('done.')
|
2020-10-22 16:41:00 +02:00
|
|
|
print('Start asynchronous ingestor...')
|
2021-08-24 17:10:14 +02:00
|
|
|
for _ in range(get_config('generic', 'async_capture_processes')):
|
2021-04-08 19:15:53 +02:00
|
|
|
Popen(['async_capture'])
|
2020-10-22 16:41:00 +02:00
|
|
|
print('done.')
|
2021-03-18 01:00:27 +01:00
|
|
|
print('Start background indexer...')
|
|
|
|
Popen(['background_indexer'])
|
|
|
|
print('done.')
|
2021-08-25 13:36:48 +02:00
|
|
|
print('Start background processing...')
|
|
|
|
Popen(['processing'])
|
|
|
|
print('done.')
|
2020-10-22 16:41:00 +02:00
|
|
|
print('Start website...')
|
2020-10-03 21:19:43 +02:00
|
|
|
Popen(['start_website'])
|
2020-10-22 16:41:00 +02:00
|
|
|
print('done.')
|
2020-10-03 21:19:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|