#!/bin/sh
# Start/stop/restart the saslauthd server:

saslauthd_start() {
	/usr/sbin/saslauthd -a getpwent
}

saslauthd_stop() {
	kill -TERM `cat /var/state/saslauthd/saslauthd.pid`	
}

saslauthd_restart() {
	saslauthd_stop
	saslauthd_start	
}

case "$1" in
'start')
  saslauthd_start
  ;;
'stop')
  saslauthd_stop
  ;;
'restart')
  saslauthd_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac
