V
V
Victor2016-06-10 09:35:33
linux
Victor, 2016-06-10 09:35:33

How to display execution status of systemctl start|restart|stop?

Greetings! Is it possible to somehow display the status of the "systemctl restart serviceName" command, so that it was like before, the output is "[ OK ]" or "[ FAILED]" ? And then after editing the configs, you start the service and xs, successfully or not, each time separately type "systemctl status serviceName" - into the scrap.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danila, 2016-06-10
@estoy

There are already 2 options:
1) systemctl start name.service && echo SUCCESS || echo failure
2) in the config /etc/systemd/journald.conf uncomment or add:
ForwardToConsole=yes
MaxLevelConsole=debug

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question