diff --git a/contrib/mta-sts-daemon b/contrib/mta-sts-daemon index c1042bc..c635b26 100644 --- a/contrib/mta-sts-daemon +++ b/contrib/mta-sts-daemon @@ -1,19 +1,30 @@ #!/bin/sh +# +# -# FreeBSD rc.d script +# PROVIDE: mta-sts-daemon +# REQUIRE: LOGIN +# KEYWORD: shutdown -. /etc/rc.subr +# +# Add the following line to /etc/rc.conf to enable `mta-sts-daemon': +# +# mta_sts_daemon_enable="YES" +. /etc/rc.subr name="mta_sts_daemon" -rcvar=`set_rcvar` +rcvar=`set_rcvar` load_rc_config $name mta_sts_daemon_enable=${mta_sts_daemon_enable:=NO} + config="/usr/local/etc/postfix/mta-sts-daemon.yml" log_file="/var/log/mta-sts.log" +log_verbosity="info" mta_sts_daemon_user="mta-sts" -command_interpreter="/usr/local/bin/python3.6" -command="/usr/local/bin/mta-sts-daemon -c ${config} -l ${log_file}" +procname="/usr/local/bin/python3.6" +command="/usr/local/bin/mta-sts-daemon -v ${log_verbosity} -c ${config} -l ${log_file}" start_cmd="/usr/sbin/daemon -u $mta_sts_daemon_user $command" + run_rc_command "$1"