summaryrefslogtreecommitdiffstats
path: root/target/device/valka/target_skeleton/etc/rc.d/ntpd
blob: 291da6317c48512dc4ad32fdc0018e5ae787b1f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/ash
. /etc/rc.subr

start() {
	if [ ! -x ${ntpd_program} ]; then
		log_error "Missing 'ntpd' program (${ntpd_program})"
		echo "Failed"
		return 1
	fi

	echo -n " * Starting ntpd: "
	if ${ntpd_program} -c ${ntpd_config} -p ${ntpd_pidfile} ${ntpd_flags}; then
		echo "Ok"
	else
		echo "Failed"
	fi
}

stop() {
	echo " * Stopping ntpd..."
	killpid ${ntpd_pidfile}
}

rc_run_command "$1" "ntpd"