2019-04-05 14:01:36 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from lookyloo.helpers import is_running, get_socket_path
|
|
|
|
import time
|
|
|
|
from redis import StrictRedis
|
|
|
|
|
2020-10-03 21:19:43 +02:00
|
|
|
|
|
|
|
def main():
|
2019-04-05 14:01:36 +02:00
|
|
|
r = StrictRedis(unix_socket_path=get_socket_path('cache'), db=1)
|
|
|
|
r.set('shutdown', 1)
|
|
|
|
time.sleep(5)
|
|
|
|
while True:
|
|
|
|
running = is_running()
|
|
|
|
if not running:
|
|
|
|
break
|
|
|
|
print(running)
|
|
|
|
time.sleep(5)
|
2020-10-03 21:19:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|