|
|
|
@ -56,7 +56,7 @@ from operator import itemgetter, attrgetter |
|
|
|
|
from validate import Validator |
|
|
|
|
|
|
|
|
|
""" --- STASHR CORE IMPORTS --- """ |
|
|
|
|
from stashr import log, database, utils, paths, folders, naming, forms, tasks, server |
|
|
|
|
from stashr import log, database, utils, paths, folders, naming, forms, tasks |
|
|
|
|
|
|
|
|
|
from stashr.config import stashrconfig |
|
|
|
|
from stashr.comicvine import cv |
|
|
|
@ -2424,7 +2424,7 @@ def restart_server(): |
|
|
|
|
This is using docstrings for specifications. |
|
|
|
|
--- |
|
|
|
|
tags: |
|
|
|
|
- plugins |
|
|
|
|
- server |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
user = current_user |
|
|
|
@ -2448,7 +2448,13 @@ def restart_server(): |
|
|
|
|
if user.role != 'admin': |
|
|
|
|
return jsonify(create_json_return('401')) |
|
|
|
|
|
|
|
|
|
server.server.restart_server() |
|
|
|
|
import ctypes |
|
|
|
|
ucrtbase = ctypes.CDLL('ucrtbase') |
|
|
|
|
c_raise = ucrtbase['raise'] |
|
|
|
|
try: |
|
|
|
|
c_raise(signal.SIGHUP) |
|
|
|
|
except: |
|
|
|
|
c_raise(signal.SIGINT) |
|
|
|
|
|
|
|
|
|
return create_json_return('200') |
|
|
|
|
|
|
|
|
|