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

start() {
	echo -n " * Starting inetd: "
	 if [ ! -x ${inetd_program} ]; then
		log_error "Missing 'inetd' program (${inetd_program})"
		echo "Failed"
		return 1
	fi

	${inetd_program} -f ${inetd_flags} &
	pid=$!
	if [ "$?" -eq 0 ]; then
		echo "${pid}" > ${inetd_pidfile}
		echo "Ok"
	else
		echo "Failed"
	fi
}

stop() {
	echo " * Stopping inetd..."
	killpid ${inetd_pidfile}
}

rc_run_command "$1" "inetd"