#!/bin/sh
# 
# Starts and stops portmap.




case "$1" in
start)

	if [ -x /usr/local/sbin/portmap ]; then
		start-stop-daemon --start --exec /usr/local/sbin/portmap
	else
		echo "Portmap is not installed.  You need to install the portmap extension."
	fi	

;;

stop)
	start-stop-daemon --stop --exec /usr/local/sbin/portmap
;;

restart)
  	$0 stop
  	$0 start
;;

*)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

