own-pki/lib/check-rc.sh
2026-04-20 06:27:02 +02:00

11 lines
199 B
Bash

# check if run from script
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 1
check_rc(){
if [ "$1" != "0" ]; then
msg_error "Error (RC:$rc)"
exit 1
else
msg_ok "OK"
fi
}