2019-01-29 18:37:13 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2021-09-07 12:59:31 +02:00
|
|
|
from subprocess import Popen, run
|
|
|
|
|
2024-03-05 20:51:21 +01:00
|
|
|
from lookyloo.default import get_homedir, get_config
|
2019-01-29 18:37:13 +01:00
|
|
|
|
2020-10-03 21:19:43 +02:00
|
|
|
|
2024-01-12 17:15:41 +01:00
|
|
|
def main() -> None:
|
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-30 12:48:13 +02:00
|
|
|
print('Start archiving process...')
|
2022-09-23 13:11:17 +02:00
|
|
|
Popen(['archiver'])
|
2021-08-24 17:10:14 +02:00
|
|
|
print('done.')
|
2020-10-22 16:41:00 +02:00
|
|
|
print('Start asynchronous ingestor...')
|
2022-09-23 13:11:17 +02:00
|
|
|
Popen(['async_capture'])
|
2020-10-22 16:41:00 +02:00
|
|
|
print('done.')
|
2024-03-05 20:51:21 +01:00
|
|
|
print('Start background capture builder...')
|
|
|
|
Popen(['background_build_captures'])
|
|
|
|
print('done.')
|
2021-03-18 01:00:27 +01:00
|
|
|
print('Start background indexer...')
|
2022-09-23 13:11:17 +02:00
|
|
|
Popen(['background_indexer'])
|
2021-03-18 01:00:27 +01:00
|
|
|
print('done.')
|
2024-03-05 20:51:21 +01:00
|
|
|
if get_config('generic', 'index_everything'):
|
|
|
|
print('Start background full indexer...')
|
|
|
|
Popen(['background_full_indexer'])
|
|
|
|
print('done.')
|
2021-08-25 13:36:48 +02:00
|
|
|
print('Start background processing...')
|
2022-09-23 13:11:17 +02:00
|
|
|
Popen(['processing'])
|
2021-08-25 13:36:48 +02:00
|
|
|
print('done.')
|
2020-10-22 16:41:00 +02:00
|
|
|
print('Start website...')
|
2022-09-23 13:11:17 +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()
|