|
|
|
@ -2448,12 +2448,13 @@ def restart_server(): |
|
|
|
|
if user.role != 'admin': |
|
|
|
|
return jsonify(create_json_return('401')) |
|
|
|
|
|
|
|
|
|
import ctypes |
|
|
|
|
ucrtbase = ctypes.CDLL('ucrtbase') |
|
|
|
|
c_raise = ucrtbase['raise'] |
|
|
|
|
try: |
|
|
|
|
c_raise(signal.SIGHUP) |
|
|
|
|
except: |
|
|
|
|
if hasattr(signal, 'SIGHUP'): |
|
|
|
|
os.kill(os.getpid(), signal.SIGHUP) |
|
|
|
|
else: |
|
|
|
|
print('no sighup') |
|
|
|
|
import ctypes |
|
|
|
|
ucrtbase = ctypes.CDLL('ucrtbase') |
|
|
|
|
c_raise = ucrtbase['raise'] |
|
|
|
|
c_raise(signal.SIGINT) |
|
|
|
|
|
|
|
|
|
return create_json_return('200') |
|
|
|
|