motd-gen

my motd scripts
git clone git://git.ckyln.com/~cem/motd-gen.git
Log | Files | Refs | README | LICENSE

commit 013349a8cc6cb8db2ba4db738525db29ecdbeb24
parent 61b0d48f21ac303410a5fb0b596c8b1973c3650f
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri,  3 Jan 2020 00:20:13 +0300

alert-scripts: colour alerts

Diffstat:
MSHAREDIR/99-alert-scripts.motd | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/SHAREDIR/99-alert-scripts.motd b/SHAREDIR/99-alert-scripts.motd @@ -9,15 +9,15 @@ CHECKFILE=/etc/motd-check # For a systemd service, it starts with s systemdcheck() { - systemctl is-active "$1" >/dev/null 2>&1 || printf "ALERT: $1 is not active\\n" + systemctl is-active "$1" >/dev/null 2>&1 || printf "\033[1;31mALERT: \033[0;00m$1 is not active\\n" } runitcheck() { - sv stat "$1" | grep -q down && printf "ALERT: $1 is not active\\n" + sv stat "$1" | grep -q down && printf "\033[1;31mALERT: \033[0;00m$1 is not active\\n" } dockercheck() { - docker container ls | grep -q "$1" || printf "ALERT: $1 is not up\\n" + docker container ls | grep -q "$1" || printf "\033[1;31mALERT: \033[0;00m$1 is not up\\n" } check() {