2019-04-05 14:01:36 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from subprocess import Popen
|
2021-09-07 12:59:31 +02:00
|
|
|
|
2019-04-05 14:01:36 +02:00
|
|
|
from redis import Redis
|
|
|
|
|
2021-09-07 12:59:31 +02:00
|
|
|
from lookyloo.helpers import get_homedir, get_socket_path
|
|
|
|
|
2020-10-03 21:19:43 +02:00
|
|
|
|
|
|
|
def main():
|
2019-04-05 14:01:36 +02:00
|
|
|
get_homedir()
|
2020-10-03 21:19:43 +02:00
|
|
|
p = Popen(['shutdown'])
|
2019-04-05 14:01:36 +02:00
|
|
|
p.wait()
|
|
|
|
r = Redis(unix_socket_path=get_socket_path('cache'), db=1)
|
|
|
|
r.delete('shutdown')
|
2020-10-03 21:19:43 +02:00
|
|
|
Popen(['run_backend', '--stop'])
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|