2019-04-05 14:01:36 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from subprocess import Popen
|
|
|
|
from lookyloo.helpers import get_homedir, get_socket_path
|
|
|
|
from redis import Redis
|
|
|
|
|
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()
|