saslauthd 464 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. #
  3. # /etc/rc.d/saslauthd: start/stop sasl authentication daemon
  4. #
  5. SASLAUTHD_PID=/var/sasl/saslauth/saslauthd.pid
  6. AUTHMECH=shadow
  7. case $1 in
  8. start)
  9. /usr/sbin/saslauthd -a $AUTHMECH
  10. ;;
  11. stop)
  12. if [ -f $SASLAUTHD_PID ]; then
  13. kill `head -1 $SASLAUTHD_PID`
  14. rm $SASLAUTHD_PID
  15. else
  16. killall -q /usr/sbin/saslauthd
  17. fi
  18. ;;
  19. restart)
  20. $0 stop
  21. sleep 2
  22. $0 start
  23. ;;
  24. *)
  25. echo "usage: $0 [start|stop|restart]"
  26. ;;
  27. esac
  28. # End of file