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()]
|
||||
except Exception:
|
||||
services = []
|
||||
for sname in ALLOWED_SERVICES:
|
||||
if f"{sname}.service" in services:
|
||||
self.available_services.append(sname)
|
||||
for svc in services:
|
||||
sname = svc.rsplit('.', 1)[0]
|
||||
for allowed in ALLOWED_SERVICES:
|
||||
if sname.startswith(allowed):
|
||||
self.available_services.append(sname)
|
||||
self.system_info['available_services'] = self.available_services
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue