sorted service list
This commit is contained in:
parent
8337f83aa0
commit
b327fc0b25
|
@ -82,7 +82,9 @@ def print_hostname():
|
||||||
def print_services():
|
def print_services():
|
||||||
if 'MOTD_SERVICES' in os.environ:
|
if 'MOTD_SERVICES' in os.environ:
|
||||||
print('Services:')
|
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='')
|
Termutils.print_padded('{:<15.15}'.format(service), end='')
|
||||||
try:
|
try:
|
||||||
check_call(['systemctl', 'is-active', service], stdout=DEVNULL, stderr=DEVNULL)
|
check_call(['systemctl', 'is-active', service], stdout=DEVNULL, stderr=DEVNULL)
|
||||||
|
|
|
@ -9,7 +9,7 @@ export EDITOR=vim
|
||||||
export PAGER=less
|
export PAGER=less
|
||||||
|
|
||||||
# motd
|
# motd
|
||||||
export MOTD_SERVICES="docker.socket $MOTD_SERVICES"
|
export MOTD_SERVICES="$MOTD_SERVICES docker.socket libvirtd"
|
||||||
|
|
||||||
# firefox
|
# firefox
|
||||||
export MOZ_USE_XINPUT2=1
|
export MOZ_USE_XINPUT2=1
|
||||||
|
|
Loading…
Reference in New Issue