xref: /OK3568_Linux_fs/buildroot/package/rpcbind/S30rpcbind (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2#
3# Starts rpcbind.
4#
5
6start() {
7	printf "Starting rpcbind: "
8	umask 077
9	start-stop-daemon -S -q -p /var/run/rpcbind.pid --exec /usr/sbin/rpcbind
10	echo "OK"
11}
12stop() {
13	printf "Stopping rpcbind daemon: "
14	start-stop-daemon -K -q -p /var/run/rpcbind.pid
15	echo "OK"
16}
17restart() {
18	stop
19	start
20}
21
22case "$1" in
23  start)
24	start
25	;;
26  stop)
27	stop
28	;;
29  restart|reload)
30	restart
31	;;
32  *)
33	echo "Usage: $0 {start|stop|restart}"
34	exit 1
35esac
36
37exit $?
38
39