How to display the status run systemctl start|restart|stop?

Welcome! Is it possible some how to display the status of the command "systemctl restart serviceName" to the way it was, the conclusion "[ OK ]" or "[ FAILED]" ? And then after you edit the configuration, start the service and XS, successfully or not, each time separately to type "systemctl status serviceName" - in the scrap.
July 8th 19 at 15:22
2 answers
July 8th 19 at 15:24
Solution
Options thought of as much as 2:
1) systemctl start name.service && echo SUCCESS || echo failure
2) in the config file /etc/systemd/journald.conf uncomment or add:
ForwardToConsole=yes
MaxLevelConsole=debug
July 8th 19 at 15:26
Solution
You can for example
$ sctl() { sudo systemctl "$@"; systemctl status "${@:2}" --lines 0 --no-pager 2>/dev/null; }
$ sctl restart mongodb
● mongodb.service - High-performance, schema-free document-oriented database
 Loaded: loaded (/usr/lib/systemd/system/mongodb.service; disabled; vendor preset: disabled)
 Active: active (running) since Fri 2016-06-10 10:32:56 MSK; 13ms ago
 Main PID: 10048 (mongod)
 Tasks: 1 (limit: 512MB)
 CGroup: /system.slice/mongodb.service
 └─10048 /usr/bin/mongod --quiet --config /etc/mongodb.conf

Find more questions by tags LinuxCentOSRed Hat Enterprise Linux