|
|
@ -111,9 +111,22 @@ def isInstalledWeb(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def restartWeb(): |
|
|
|
def restartWeb(): |
|
|
|
if isInstalledWeb(): |
|
|
|
if not isInstalledWeb(): |
|
|
|
initd = getServerDir() + '/openresty/init.d/openresty' |
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# systemd |
|
|
|
|
|
|
|
systemd = '/lib/systemd/system/openresty.service' |
|
|
|
|
|
|
|
if os.path.exists(systemd): |
|
|
|
|
|
|
|
execShell('systemctl restart openresty') |
|
|
|
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# initd |
|
|
|
|
|
|
|
initd = getServerDir() + '/openresty/init.d/openresty' |
|
|
|
|
|
|
|
if os.path.exists(initd): |
|
|
|
execShell(initd + ' ' + 'restart') |
|
|
|
execShell(initd + ' ' + 'restart') |
|
|
|
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def restartMw(): |
|
|
|
def restartMw(): |
|
|
|