#!/bin/bash echo before: pgrep -a ntpd echo -n send term to ntpd ... pkill ntpd && echo done echo idle 3 seconds sleep 3 echo -n start `which ntpd` ... ntpd -f /etc/openntpd.conf -s && echo done echo after: pgrep -a ntpd