Update check-nextcloud

This commit is contained in:
Thorsten Spille 2022-01-30 22:07:37 +01:00 committed by GitHub
parent 0eaf72ce64
commit b440200651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ def update_check(conf:dict):
updates = result
count = 0
return f" updates={count};;1;; {updates}"
return f"updates={count};;1;; {updates}"
def status(conf:dict):
result = json.loads(occ("status", conf['nc_www_user'],conf['nc_path'], conf['nc_php_version'], output="json"))
@ -58,7 +58,7 @@ def status(conf:dict):
state = 1
else:
state = 0
return f" status={state};1;2;; {' '.join(['{0}: {1}'.format(key, value) for (key, value) in result.items()])}"
return f"status={state};1;2;; {' '.join(['{0}: {1}'.format(key, value) for (key, value) in result.items()])}"
def printout(name:str,function:str, result:str):
print(f'P "Nextcloud {name} {function}" {result}')