mirror of
https://github.com/bashclub/check-nextcloud.git
synced 2024-11-07 15:01:58 +01:00
Update check_nextcloud
This commit is contained in:
parent
4efd18ffba
commit
311b741ab9
@ -41,7 +41,7 @@ def check_nextcloud(name:str, conf:dict):
|
|||||||
def update_check(conf:dict):
|
def update_check(conf:dict):
|
||||||
result = occ("update:check", conf['nc_www_user'],conf['nc_path'], conf['nc_php_version'])
|
result = occ("update:check", conf['nc_www_user'],conf['nc_path'], conf['nc_php_version'])
|
||||||
|
|
||||||
if len(result.split('\n')) > 1:
|
if len(result.split('\n')) > 2:
|
||||||
updates = "Updates:\n" + "\n".join(map(lambda x: "{0}:{1}".format(*x),re.findall("(\w+)(?:\sto version)?\s([\d+.]+) is available",result)))
|
updates = "Updates:\n" + "\n".join(map(lambda x: "{0}:{1}".format(*x),re.findall("(\w+)(?:\sto version)?\s([\d+.]+) is available",result)))
|
||||||
count = result.split('\n')[-2].split(' ')[0]
|
count = result.split('\n')[-2].split(' ')[0]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user