#!/usr/bin/bash # Check if ntpd or chronyd is running if pgrep ntpd > /dev/null || pgrep chronyd > /dev/null; then exit 0 else exit 2 fi