# Uninstalls the NTPD software installed by the ntpd-install.sh script

launchctl stop ntpd

if [ -f "/Library/LaunchDaemons/ntpd.plist" ]; then
 launchctl unload /Library/LaunchDaemons/ntpd.plist
 rm "/Library/LaunchDaemons/ntpd.plist"
fi

if [ -f "/usr/local/sbin/ntpd" ]; then
 rm "/usr/local/sbin/ntpd"
fi

if [ -f "/usr/local/sbin/ntpctl" ]; then
 rm "/usr/local/sbin/ntpctl"
fi

if [ -f "/usr/local/etc/ntpd.conf" ]; then
 rm "/usr/local/etc/ntpd.conf"
fi

if [ -f "/Library/StartupItems/ntpd.sh" ]; then
 rm "/Library/StartupItems/ntpd.sh"
fi

echo "The NTPD software has been uninstalled"