#!/bin/sh # Start/stop/restart ntpd time server: if [ "$1" = "stop" ]; then echo "Stopping ntpd..." killall ntpd elif [ "$1" = "restart" ]; then echo "Restarting ntpd..." killall ntpd sleep 1 /usr/sbin/ntpd else # assume $1 = start: echo "Starting ntpd: /usr/sbin/ntpd" /usr/sbin/ntpdate 192.168.1.21 /usr/sbin/ntpd fi