mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #269 from YunoHost/clean-services.yml
Clean services.yml
This commit is contained in:
commit
373ef1acba
3 changed files with 11 additions and 8 deletions
|
@ -65,7 +65,7 @@ with open('/etc/yunohost/services.yml') as f:
|
|||
updated = False
|
||||
for service, conf in new_services.items():
|
||||
# remove service with empty conf
|
||||
if not conf:
|
||||
if conf is None:
|
||||
if service in services:
|
||||
print("removing '{0}' from services".format(service))
|
||||
del services[service]
|
||||
|
|
|
@ -50,10 +50,12 @@ yunohost-firewall:
|
|||
nslcd:
|
||||
status: service
|
||||
log: /var/log/syslog
|
||||
nsswitch:
|
||||
status: service
|
||||
udisks2:
|
||||
status: service
|
||||
nsswitch: {}
|
||||
bind9: null
|
||||
tahoe-lafs: null
|
||||
memcached: null
|
||||
udisks2: null
|
||||
udisk-glue: null
|
||||
amavis: null
|
||||
postgrey: null
|
||||
spamassassin: null
|
||||
|
|
|
@ -201,11 +201,12 @@ def service_status(names=[]):
|
|||
m18n.n('service_unknown', service=name))
|
||||
|
||||
status = None
|
||||
if 'status' not in services[name] or \
|
||||
services[name]['status'] == 'service':
|
||||
if services[name].get('status') == 'service':
|
||||
status = 'service %s status' % name
|
||||
else:
|
||||
elif "status" in services[name]:
|
||||
status = str(services[name]['status'])
|
||||
else:
|
||||
continue
|
||||
|
||||
runlevel = 5
|
||||
if 'runlevel' in services[name].keys():
|
||||
|
|
Loading…
Add table
Reference in a new issue