mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed stopping main server from console
This commit is contained in:
parent
9cf1fb3ed8
commit
eb82282e58
@ -5,7 +5,7 @@ author = {
|
||||
"email":"maloja@krateng.dev",
|
||||
"github": "krateng"
|
||||
}
|
||||
version = 2,3,3
|
||||
version = 2,3,4
|
||||
versionstr = ".".join(str(n) for n in version)
|
||||
links = {
|
||||
"pypi":"malojaserver",
|
||||
|
@ -126,20 +126,25 @@ def stop():
|
||||
pid_sv = getInstanceSupervisor()
|
||||
if pid_sv is not None:
|
||||
os.kill(pid_sv,signal.SIGTERM)
|
||||
return True
|
||||
# return True
|
||||
|
||||
else:
|
||||
print("Server is not running")
|
||||
return False
|
||||
|
||||
# pid = getInstance()
|
||||
# if pid is None:
|
||||
# else:
|
||||
# print("Server is not running")
|
||||
# return False
|
||||
|
||||
|
||||
pid = getInstance()
|
||||
if pid is not None:
|
||||
# print("Server is not running")
|
||||
# return False
|
||||
# pass
|
||||
# else:
|
||||
# os.kill(pid,signal.SIGTERM)
|
||||
os.kill(pid,signal.SIGTERM)
|
||||
# print("Maloja stopped! PID: " + str(pid))
|
||||
if pid is not None or pid_sv is not None:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def loadlastfm(filename):
|
||||
|
@ -31,7 +31,6 @@ def update():
|
||||
def start():
|
||||
try:
|
||||
p = subprocess.Popen(["python3","-m","maloja.server"],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
|
||||
log(p,module="supervisor")
|
||||
|
||||
except e:
|
||||
log("Error starting Maloja: " + str(e),module="supervisor")
|
||||
|
Loading…
Reference in New Issue
Block a user