34 lines
435 B
Bash
34 lines
435 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/ypserv: start/stop NIS services
|
|
#
|
|
|
|
. /etc/rc.conf
|
|
|
|
case $1 in
|
|
start)
|
|
test "$YPDOMAIN" || {
|
|
echo "YPDOMAIN not defined in /etc/rc.conf"
|
|
exit 1
|
|
}
|
|
|
|
/bin/domainname $YPDOMAIN
|
|
/usr/sbin/ypserv
|
|
/usr/sbin/rpc.yppasswdd
|
|
;;
|
|
stop)
|
|
killall -q /usr/sbin/rpc.yppasswdd
|
|
killall -q /usr/sbin/ypserv
|
|
;;
|
|
|
|
restart)
|
|
pkill -HUP /usr/sbin/ypserv
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 start|stop|restart"
|
|
;;
|
|
esac
|
|
|
|
# End of file
|