1
0
Fork 0

sorted service list

This commit is contained in:
Massaki Archambault 2018-05-14 17:18:32 -04:00
parent 8337f83aa0
commit b327fc0b25
2 changed files with 4 additions and 2 deletions

View File

@ -82,7 +82,9 @@ def print_hostname():
def print_services():
if 'MOTD_SERVICES' in os.environ:
print('Services:')
for service in set(os.environ['MOTD_SERVICES'].split()):
services = list(set(os.environ['MOTD_SERVICES'].split()))
services.sort()
for service in services:
Termutils.print_padded('{:<15.15}'.format(service), end='')
try:
check_call(['systemctl', 'is-active', service], stdout=DEVNULL, stderr=DEVNULL)

View File

@ -9,7 +9,7 @@ export EDITOR=vim
export PAGER=less
# motd
export MOTD_SERVICES="docker.socket $MOTD_SERVICES"
export MOTD_SERVICES="$MOTD_SERVICES docker.socket libvirtd"
# firefox
export MOZ_USE_XINPUT2=1