Advertisement
Guest User

Get nice info on chosen systemd services

a guest
Jul 8th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.55 KB | None | 0 0
  1. ### Get nice info on chosen systemd services
  2. function service-stats {
  3.         ### With pipe systemctl would omit color, so we use script
  4.         script -q -c "systemctl status \
  5.                ssh.service \
  6.                openvpn.service \
  7.                tor.service \
  8.                ejabberd.service \
  9.                nginx.service \
  10.                php5-fpm.service \
  11.                mysql.service \
  12.                grafana-server.service" - \
  13.         | sed "s/^●/\o033\[33m●\o033\[0m/g" \
  14.         | grep --color=no -E "(●)|(^( ){1,}
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement