machine: extend allowed services
Allow all services that start with a match. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
def6b365fa
commit
628c0193f3
|
@ -243,9 +243,11 @@ class Machine:
|
||||||
if ".service" in line.strip()]
|
if ".service" in line.strip()]
|
||||||
except Exception:
|
except Exception:
|
||||||
services = []
|
services = []
|
||||||
for sname in ALLOWED_SERVICES:
|
for svc in services:
|
||||||
if f"{sname}.service" in services:
|
sname = svc.rsplit('.', 1)[0]
|
||||||
self.available_services.append(sname)
|
for allowed in ALLOWED_SERVICES:
|
||||||
|
if sname.startswith(allowed):
|
||||||
|
self.available_services.append(sname)
|
||||||
self.system_info['available_services'] = self.available_services
|
self.system_info['available_services'] = self.available_services
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue