48 lines
584 B
Bash

#!/bin/bash
# mdmcertcheck.sh is the script for checking a cert status
# author mikedmorto 2021 year
export LC_ALL=""
export LANG="en_US.UTF-8"
version="0.0"
CERTLIST="certlist.cfg"
JSON=""
##### PARAMETERS#####
METRIC="$1"
ITEM="$2"
case "$METRIC" in
discovery)
#records from the config file
RECS=`cat `
JSON="{ \"data\":["
# append data
# delete last simbol and add the end
JSON=${JSON::-1}
JSON=${JSON}"]}"
echo ${JSON}
exit 0
;;
script.verstion)
echo $VERSION
;;
help)
echo "please use these params
{
discovery
script.version
}"
;;
*)
echo ""
;;
esac