#!/bin/bash . /etc/rc.conf . /etc/rc.d/functions case "$1" in start) add_daemon smtpd /usr/bin/smtpd ;; stop) killall -s 9 smtpd rm_daemon smtpd ;; restart) $0 stop sleep 2 $0 start ;; *) echo "usage: $0 {start|stop|restart}" esac