complete rewrite of so-status

This commit is contained in:
Jason Ertel
2022-09-16 17:46:52 -04:00
parent deb19d24b8
commit 9542a5ada2
4 changed files with 151 additions and 276 deletions
+4 -2
View File
@@ -11,10 +11,12 @@
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
SOSTATUSLOG=/var/log/sostatus/status.log
SOSTATUSSTATUS=$(cat /var/log/sostatus/status.log)
SOSTATUSCODE=$(jq -r .status_code /var/log/sostatus/status.log)
SOSTATUSJSON=$(cat /var/log/sostatus/status.log)
if [ -f "$SOSTATUSLOG" ]; then
echo "sostatus status=$SOSTATUSSTATUS"
echo "sostatus status=$SOSTATUSCODE"
echo "sostatus json=$SOSTATUSJSON"
else
exit 0
fi