From ae5215e025daae99b3ebfe22cd65310eebbdfc70 Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Thu, 16 Apr 2020 14:49:59 +0000 Subject: [PATCH] - cleanup rc.d script --- ftp/vsftpd/Makefile | 2 +- ftp/vsftpd/files/vsftpd.in | 7 +-- irc/iroffer-dinoex/Makefile | 5 +- .../files/{iroffer-dinoex.in => iroffer.in} | 35 +++++++------- mail/antivirus-milter/Makefile | 4 +- .../{antivirus-milter.in => antivirus.in} | 32 +++++++------ mail/archivesmtp/Makefile | 2 +- mail/archivesmtp/files/archivesmtp.in | 21 ++++----- mail/milter-regex/Makefile | 1 + mail/milter-regex/files/milterregex.in | 21 ++++----- mail/noattach/Makefile | 2 +- mail/noattach/files/noattach.in | 40 ++++++++-------- mail/rbl-milter/Makefile | 46 +++++++++++++------ mail/rbl-milter/files/rblmilter.in | 40 ++++++++-------- mail/sid-milter/Makefile | 4 +- .../files/{milter-sid.in => miltersid.in} | 31 +++++++------ mail/spamilter/Makefile | 2 +- mail/spamilter/files/spamilter.in | 23 +++++----- mail/vbsfilter/Makefile | 2 +- mail/vbsfilter/files/vbsfilter.in | 30 ++++++------ net/miniupnpc/Makefile | 2 +- net/miniupnpc/files/miniupnpc.in | 21 +++++---- security/tinc-devel/Makefile | 2 +- security/tinc-devel/files/tincd.in | 22 +++++---- security/tinc/Makefile | 2 +- security/tinc/files/tincd.in | 22 +++++---- sysutils/xe-guest-utilities/Makefile | 2 +- sysutils/xe-guest-utilities/files/xenguest.in | 11 +++-- 28 files changed, 239 insertions(+), 195 deletions(-) rename irc/iroffer-dinoex/files/{iroffer-dinoex.in => iroffer.in} (81%) rename mail/antivirus-milter/files/{antivirus-milter.in => antivirus.in} (67%) rename mail/sid-milter/files/{milter-sid.in => miltersid.in} (57%) diff --git a/ftp/vsftpd/Makefile b/ftp/vsftpd/Makefile index 6ee5471ce7c4..dc522891ca5c 100644 --- a/ftp/vsftpd/Makefile +++ b/ftp/vsftpd/Makefile @@ -3,7 +3,7 @@ PORTNAME= vsftpd PORTVERSION= 3.0.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= ftp MASTER_SITES= https://security.appspot.com/downloads/ \ GENTOO diff --git a/ftp/vsftpd/files/vsftpd.in b/ftp/vsftpd/files/vsftpd.in index 5f612c27c8dc..e4a6c28c6526 100644 --- a/ftp/vsftpd/files/vsftpd.in +++ b/ftp/vsftpd/files/vsftpd.in @@ -2,10 +2,10 @@ # # $FreeBSD$ # - # PROVIDE: vsftpd # REQUIRE: DAEMON - +# KEYWORD: shutdown +# # To enable 'vsftpd' in standalone mode, you need to edit two files. # 1. add the following line(s) to /etc/rc.conf to enable `vsftpd': # @@ -24,12 +24,13 @@ . /etc/rc.subr name="vsftpd" +desc="Vsftpd FTP Server" rcvar="vsftpd_enable" load_rc_config "$name" + : ${vsftpd_enable:="NO"} : ${vsftpd_config:="%%PREFIX%%/etc/$name.conf"} - command="%%PREFIX%%/libexec/$name" required_files="${vsftpd_config}" start_precmd="vsftpd_check" diff --git a/irc/iroffer-dinoex/Makefile b/irc/iroffer-dinoex/Makefile index 7b113c73c924..9781f60e3f4c 100644 --- a/irc/iroffer-dinoex/Makefile +++ b/irc/iroffer-dinoex/Makefile @@ -2,7 +2,7 @@ PORTNAME= iroffer PORTVERSION= 3.32 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= irc MASTER_SITES= https://iroffer.net/ PKGNAMESUFFIX= -dinoex${PKGNAMESUFFIX2} @@ -20,8 +20,9 @@ HAS_CONFIGURE= yes CONFIGURE_SCRIPT= Configure CONFIGURE_ARGS= CC="${CC}" LDFLAGS="${LDFLAGS}" LOCALBASE="${LOCALBASE}" CONFIGURE_ENV= LANG=en_EN.UTF-8 +MAKE_ENV= LANG=en_EN.UTF-8 ALL_TARGET= all-lang doc -USE_RC_SUBR= iroffer-dinoex +USE_RC_SUBR= iroffer IROFFER_DOCS= README README.modDinoex LIESMICH.modDinoex \ LICENSE THANKS TODO \ diff --git a/irc/iroffer-dinoex/files/iroffer-dinoex.in b/irc/iroffer-dinoex/files/iroffer.in similarity index 81% rename from irc/iroffer-dinoex/files/iroffer-dinoex.in rename to irc/iroffer-dinoex/files/iroffer.in index 08ef365273e9..b9aa05d0b833 100644 --- a/irc/iroffer-dinoex/files/iroffer-dinoex.in +++ b/irc/iroffer-dinoex/files/iroffer.in @@ -2,11 +2,9 @@ # # $FreeBSD$ # - # PROVIDE: iroffer # REQUIRE: LOGIN # KEYWORD: shutdown - # # iroffer_enable="YES" # iroffer_flags="" @@ -21,18 +19,27 @@ . /etc/rc.subr name="iroffer" -rcvar=iroffer_enable +desc="Iroffer IRC Bot" +rcvar="iroffer_enable" -# read configuration and set defaults load_rc_config "$name" -: ${iroffer_enable="NO"} -: ${iroffer_user="bot"} -: ${iroffer_bin="iroffer"} -: ${iroffer_dir="/home/bot/iroffer/"} -: ${iroffer_config="${iroffer_dir}mybot.config"} + +: ${iroffer_enable:="NO"} +: ${iroffer_user:="bot"} +: ${iroffer_bin:="iroffer"} +: ${iroffer_dir:="/home/bot/iroffer/"} +: ${iroffer_config:="${iroffer_dir}mybot.config"} start_precmd="iroffer_checkdisk" restart_precmd="iroffer_checkdisk" +required_files="${iroffer_config}" +command="${iroffer_dir}/${iroffer_bin}" +if [ -n "${iroffer_dir}" ]; then + command_args="${command_args} -w ${iroffer_dir}" +fi +command_args="${command_args} -u ${iroffer_user}" +command_args="${command_args} -b ${iroffer_config}" +pidfile="${iroffer_dir}/mybot.pid" iroffer_checkdisk() { @@ -46,14 +53,4 @@ iroffer_checkdisk() fi } -required_files="${iroffer_config}" -command="${iroffer_dir}/${iroffer_bin}" -if [ -n "${iroffer_dir}" ]; then - command_args="${command_args} -w ${iroffer_dir}" -fi -command_args="${command_args} -u ${iroffer_user}" -command_args="${command_args} -b ${iroffer_config}" -pidfile="${iroffer_dir}/mybot.pid" run_rc_command "$1" - -# eof diff --git a/mail/antivirus-milter/Makefile b/mail/antivirus-milter/Makefile index 57c81839847f..2f9ea3bacd8e 100644 --- a/mail/antivirus-milter/Makefile +++ b/mail/antivirus-milter/Makefile @@ -2,7 +2,7 @@ PORTNAME= antivirus PORTVERSION= 3.30 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= mail MASTER_SITES= LOCAL/dinoex @@ -17,7 +17,7 @@ PLIST_SUB+= ANTIVIRUS=${ANTIVIRUS_DIR} SUB_LIST+= ANTIVIRUS=${ANTIVIRUS_DIR} SED_SCRIPT= -e 's|%%ANTIVIRUS%%|${ANTIVIRUS_DIR}|g' \ -e 's|%%PREFIX%%|${PREFIX}|g' -USE_RC_SUBR= antivirus-milter +USE_RC_SUBR= antivirus ANTIVIRUS_DIR?= /var/spool/antivirus diff --git a/mail/antivirus-milter/files/antivirus-milter.in b/mail/antivirus-milter/files/antivirus.in similarity index 67% rename from mail/antivirus-milter/files/antivirus-milter.in rename to mail/antivirus-milter/files/antivirus.in index 57ace61e9835..485894520c59 100644 --- a/mail/antivirus-milter/files/antivirus-milter.in +++ b/mail/antivirus-milter/files/antivirus.in @@ -1,15 +1,15 @@ #!/bin/sh - +# # $FreeBSD$ - +# # Start or stop antivirus - +# # PROVIDE: antivirus # REQUIRE: DAEMON # BEFORE: mail # KEYWORD: shutdown # - +# # Define these antivirus_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local @@ -17,31 +17,33 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE # -antivirus_enable=${antivirus_enable:-"NO"} # Enable antivirus-milter -antivirus_pidfile=${antivirus_pidfile:-"%%ANTIVIRUS%%/run/antivirus.pid"} # Path to pidfile -antivirus_socket=${antivirus_socket:-"%%ANTIVIRUS%%/antivirus.sock"} # Path to socket -#antivirus_flags=${antivirus_flags:-""} # Flags to antivirus . /etc/rc.subr name="antivirus" +desc="Antivirus Milter Daemon" rcvar="antivirus_enable" + +load_rc_config $name + +: ${antivirus_enable:="NO"} +: ${antivirus_pidfile:="%%ANTIVIRUS%%/run/antivirus.pid"} +: ${antivirus_socket:="%%ANTIVIRUS%%/antivirus.sock"} command="%%PREFIX%%/libexec/antivirus" +command_args="-p local:${antivirus_socket} ${antivirus_flags}" +pidfile="${antivirus_pidfile}" required_files="%%PREFIX%%/etc/antivirus.conf" start_precmd="antivirus_prestart" stop_postcmd="antivirus_poststop" -antivirus_prestart() { +antivirus_prestart() +{ /bin/rm -f "${pidfile}" "${antivirus_socket}" } -antivirus_poststop() { +antivirus_poststop() +{ /bin/rm -f "${pidfile}" "${antivirus_socket}" } -load_rc_config $name - -pidfile="${antivirus_pidfile}" -command_args="-p local:${antivirus_socket} ${antivirus_flags}" - run_rc_command "$1" diff --git a/mail/archivesmtp/Makefile b/mail/archivesmtp/Makefile index 2e7242ba14c9..188b891c7316 100644 --- a/mail/archivesmtp/Makefile +++ b/mail/archivesmtp/Makefile @@ -3,7 +3,7 @@ PORTNAME= archivesmtp PORTVERSION= 1.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= http://www.dancingfortune.com/projects/archivesmtp/files/ diff --git a/mail/archivesmtp/files/archivesmtp.in b/mail/archivesmtp/files/archivesmtp.in index ce14d0c415ee..4267118e093b 100644 --- a/mail/archivesmtp/files/archivesmtp.in +++ b/mail/archivesmtp/files/archivesmtp.in @@ -1,30 +1,29 @@ #!/bin/sh - +# # $FreeBSD$ # # PROVIDE: archivesmtp +# REQUIRE: DAEMON # BEFORE: mail # KEYWORD: shutdown . /etc/rc.subr name="archivesmtp" -rcvar=`set_rcvar` - -command="%%PREFIX%%/sbin/${name}" +desc="Achive SMTP Milter Daemon" +rcvar="archivesmtp_enable" # Read settings and set defaults load_rc_config "$name" -: ${archivesmtp_enable="NO"} -: ${archivesmtp_chuser="nobody"} -: ${archivesmtp_socket="unix:%%SOCKETBASE%%/%%SOCKETDIR%%/mta.sock"} -: ${archivesmtp_config="%%PREFIX%%/etc/archivesmtp.conf"} -: ${archivesmtp_pidfile="%%SOCKETBASE%%/%%SOCKETDIR%%/run.pid"} +: ${archivesmtp_enable:="NO"} +: ${archivesmtp_chuser:="nobody"} +: ${archivesmtp_socket:="unix:%%SOCKETBASE%%/%%SOCKETDIR%%/mta.sock"} +: ${archivesmtp_config:="%%PREFIX%%/etc/archivesmtp.conf"} +: ${archivesmtp_pidfile:="%%SOCKETBASE%%/%%SOCKETDIR%%/run.pid"} # archivesmtp_flags= May be used to set optional behaviours. - +command="%%PREFIX%%/sbin/${name}" pidfile="${archivesmtp_pidfile}" - command_args="-p ${archivesmtp_socket} -f ${archivesmtp_config} -u ${archivesmtp_chuser} -r ${archivesmtp_pidfile} ${archivesmtp_flags} &" run_rc_command "$1" diff --git a/mail/milter-regex/Makefile b/mail/milter-regex/Makefile index cf5ff6aff7ef..81705326b448 100644 --- a/mail/milter-regex/Makefile +++ b/mail/milter-regex/Makefile @@ -3,6 +3,7 @@ PORTNAME= milter-regex PORTVERSION= 2.7 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= https://www.benzedrine.ch/ diff --git a/mail/milter-regex/files/milterregex.in b/mail/milter-regex/files/milterregex.in index 8c3dcae175af..ffe75abfb960 100644 --- a/mail/milter-regex/files/milterregex.in +++ b/mail/milter-regex/files/milterregex.in @@ -1,16 +1,12 @@ #!/bin/sh # $FreeBSD$ - -# Start or stop milterregex - +# # PROVIDE: milterregex # REQUIRE: DAEMON # BEFORE: mail # KEYWORD: shutdown - -spooldir=%%SPOOLDIR%% - +# # Define these milterregex_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local @@ -20,21 +16,24 @@ spooldir=%%SPOOLDIR%% # # milterregex_flags Flags to milter-regex program -[ -z "$milterregex_enable" ] && milterregex_enable="NO" # Enable milter-regex - . /etc/rc.subr name="milterregex" +desc="RegEx Milter Daemon" rcvar="milterregex_enable" + +load_rc_config $name + +: ${milterregex_enable:="NO"} command="%%PREFIX%%/libexec/milter-regex" -pidfile="${spooldir}/milter-regex.pid" +pidfile="%%SPOOLDIR%%/milter-regex.pid" required_files="%%PREFIX%%/etc/milter-regex.conf" stop_postcmd="milterregex_poststop" command_args="-r ${pidfile}" -milterregex_poststop() { +milterregex_poststop() +{ /bin/rm -f ${pidfile} } -load_rc_config $name run_rc_command "$1" diff --git a/mail/noattach/Makefile b/mail/noattach/Makefile index 1691678df51e..a7922d9c2cda 100644 --- a/mail/noattach/Makefile +++ b/mail/noattach/Makefile @@ -2,7 +2,7 @@ PORTNAME= noattach PORTVERSION= 1.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= ftp://ftp.dinoex.de/pub/FreeBSD/distfiles/ diff --git a/mail/noattach/files/noattach.in b/mail/noattach/files/noattach.in index ac167c52feca..3e4d40f44818 100644 --- a/mail/noattach/files/noattach.in +++ b/mail/noattach/files/noattach.in @@ -19,35 +19,39 @@ # # noattach_flags Flags to noattach -noattach_enable=${noattach_enable:-"NO"} # Enable noattach -noattach_pidfile=${noattach_pidfile:-"/var/run/noattach.pid"} # Path to pidfile -noattach_socket=${noattach_socket:-"/var/run/noattach"} # Path to socket - . /etc/rc.subr name="noattach" +desc="Noattach Milter Daemon" rcvar="noattach_enable" + +load_rc_config $name + +: ${noattach_enable:="NO"} +: ${noattach_pidfile:="/var/run/noattach.pid"} +: ${noattach_socket:="/var/run/noattach"} command="%%PREFIX%%/libexec/${name}" required_files="%%PREFIX%%/etc/noattach.patterns" start_precmd="noattach_prestart" stop_postcmd="noattach_poststop" reload_cmd="noattach_reload" extra_commands="reload" - -noattach_prestart() { - /bin/rm -f "${pidfile}" "${noattach_socket}" -} - -noattach_poststop() { - /bin/rm -f "${pidfile}" "${noattach_socket}" -} - -noattach_reload() { - kill -USR1 `head -1 "${pidfile}"` -} - -load_rc_config $name pidfile="${noattach_pidfile}" command_args="-p local:${noattach_socket} ${noattach_flags}" +noattach_prestart() +{ + /bin/rm -f "${pidfile}" "${noattach_socket}" +} + +noattach_poststop() +{ + /bin/rm -f "${pidfile}" "${noattach_socket}" +} + +noattach_reload() +{ + kill -USR1 `head -1 "${pidfile}"` +} + run_rc_command "$1" diff --git a/mail/rbl-milter/Makefile b/mail/rbl-milter/Makefile index 3f30cdfac05d..a7922d9c2cda 100644 --- a/mail/rbl-milter/Makefile +++ b/mail/rbl-milter/Makefile @@ -1,24 +1,44 @@ -# Created by: wolpert # $FreeBSD$ -PORTNAME= rbl-milter -PORTVERSION= 0.30 -PORTREVISION= 5 +PORTNAME= noattach +PORTVERSION= 1.2 +PORTREVISION= 4 CATEGORIES= mail -MASTER_SITES= http://www.gnu-darwin.org/distfiles/ +MASTER_SITES= ftp://ftp.dinoex.de/pub/FreeBSD/distfiles/ MAINTAINER= dinoex@FreeBSD.org -COMMENT= Milter that adds mail header warnings on mail from open-relays +COMMENT= Attachment filter for Sendmail Milter -USES= gmake GNU_CONFIGURE= yes +USE_RC_SUBR= noattach +DOCSFILES= AUTHORS THANKS INSTALL NEWS README TODO ChangeLog +SAMPLEFILES= README noattach.patterns noattach.patterns.johncon -USE_RC_SUBR= rblmilter -PLIST_FILES= sbin/rbl-milter +OPTIONS_DEFINE= DOCS EXAMPLES -CONFIGURE_ARGS+= --with-sendmail=${MILTERBASE} \ - --with-sendmail-obj=${MILTERBASE}/lib +.include -.include "${.CURDIR}/../sendmail/bsd.milter.mk" +.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk" -.include +CONFIGURE_ENV+= MILTER_INCLUDES="${MILTERINC}" +MAKE_ENV+= MILTER_INCLUDES="${MILTERINC}" + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/noattach ${STAGEDIR}${PREFIX}/libexec/noattach + ${INSTALL_MAN} ${WRKSRC}/noattach.8 ${STAGEDIR}${PREFIX}/man/man8/ + ${INSTALL_DATA} ${WRKSRC}/examples/noattach.patterns \ + ${STAGEDIR}${PREFIX}/etc/noattach.patterns-dist + +do-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.for i in ${DOCSFILES} + ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/ +.endfor + +do-install-EXAMPLES-on: + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} +.for i in ${SAMPLEFILES} + ${INSTALL_DATA} ${WRKSRC}/examples/${i} ${STAGEDIR}${EXAMPLESDIR}/ +.endfor + +.include diff --git a/mail/rbl-milter/files/rblmilter.in b/mail/rbl-milter/files/rblmilter.in index 89d1b1141aca..163cf44ebba1 100644 --- a/mail/rbl-milter/files/rblmilter.in +++ b/mail/rbl-milter/files/rblmilter.in @@ -1,15 +1,15 @@ #!/bin/sh - +# # $FreeBSD$ - +# # Start or stop rblmilter - +# # PROVIDE: rblmilter # REQUIRE: DAEMON # BEFORE: mail # KEYWORD: shutdown # - +# # Define these rblmilter_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local @@ -17,30 +17,32 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE # -rblmilter_enable=${rblmilter_enable:-"NO"} # Enable rblmilter -rblmilter_socket=${rblmilter_socket:-"/var/run/rbl-milter"} # Path to socket -rblmilter_flags=${rblmilter_flags:-"-l -r -d relays.ordb.org"} # Flags to rblmilter . /etc/rc.subr name="rblmilter" +desc="RBL Milter Daemon" rcvar="rblmilter_enable" + +load_rc_config $name + +: ${rblmilter_enable:="NO"} +: ${rblmilter_socket:="/var/run/rbl-milter"} +: ${rblmilter_flags:="-l -r -d relays.ordb.org"} command="%%PREFIX%%/sbin/rbl-milter" start_precmd="rblmilter_prestart" stop_postcmd="rblmilter_poststop" extra_commands="reload" - -rblmilter_prestart() { - /bin/rm -f "${rblmilter_socket}" -} - -rblmilter_poststop() { - /bin/rm -f "${rblmilter_socket}" -} - -load_rc_config $name command_args="-p local:${rblmilter_socket} ${rblmilter_flags}" -run_rc_command "$1" +rblmilter_prestart() +{ + /bin/rm -f "${rblmilter_socket}" +} -# eof +rblmilter_poststop() +{ + /bin/rm -f "${rblmilter_socket}" +} + +run_rc_command "$1" diff --git a/mail/sid-milter/Makefile b/mail/sid-milter/Makefile index 5a6086a0e462..3dff9123eca4 100644 --- a/mail/sid-milter/Makefile +++ b/mail/sid-milter/Makefile @@ -2,7 +2,7 @@ PORTNAME= sid-milter PORTVERSION= 1.0.0 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= mail MASTER_SITES= SF/${PORTNAME}/SenderID%20Milter/${PORTVERSION} @@ -19,7 +19,7 @@ DOCSFILES= FEATURES INSTALL KNOWNBUGS LICENSE README README-SenderID \ RELEASE_NOTES rfc4406.txt rfc4407.txt rfc4408.txt INSTALL_WRKSRC= ${WRKSRC}/sid-filter PLIST_FILES= libexec/sid-filter man/man8/sid-filter.8.gz -USE_RC_SUBR= milter-sid +USE_RC_SUBR= miltersid PORTDOCS= ${DOCSFILES} SITE+= ${FILESDIR}/site.config.m4 diff --git a/mail/sid-milter/files/milter-sid.in b/mail/sid-milter/files/miltersid.in similarity index 57% rename from mail/sid-milter/files/milter-sid.in rename to mail/sid-milter/files/miltersid.in index a923e2b8f0b7..9b1cc9470134 100644 --- a/mail/sid-milter/files/milter-sid.in +++ b/mail/sid-milter/files/miltersid.in @@ -2,42 +2,43 @@ # # $FreeBSD$ # - +# # PROVIDE: miltersid # REQUIRE: DAEMON # BEFORE: mail localpkg - +# KEYWORD: shutdown +# # Define these miltersid_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/miltersid # +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# . /etc/rc.subr name="miltersid" +desc="SID Milter Daemon" rcvar="miltersid_enable" load_rc_config $name -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -: ${miltersid_enable="NO"} -: ${miltersid_socket="local:/var/run/sid-filter"} -: ${miltersid_pid="/var/run/sid-filter.pid"} -: ${miltersid_flags="-r 0 -t"} - +: ${miltersid_enable:="NO"} +: ${miltersid_socket:="local:/var/run/sid-filter"} +: ${miltersid_pid:="/var/run/sid-filter.pid"} +: ${miltersid_flags:="-r 0 -t"} pidfile=${miltersid_pid} command="%%PREFIX%%/libexec/sid-filter" command_args="-l -p ${miltersid_socket} -P ${miltersid_pid}" start_precmd="sid_precmd" -sid_precmd () +sid_precmd() { - if [ -S ${miltersid_socket##local:} ] ; then - rm -f ${miltersid_socket##local:} - elif [ -S ${miltersid_socket##unix:} ] ; then - rm -f ${miltersid_socket##unix:} - fi + if [ -S ${miltersid_socket##local:} ] ; then + rm -f ${miltersid_socket##local:} + elif [ -S ${miltersid_socket##unix:} ] ; then + rm -f ${miltersid_socket##unix:} + fi } run_rc_command "$1" diff --git a/mail/spamilter/Makefile b/mail/spamilter/Makefile index 227dbd004ad1..e182099bbf46 100644 --- a/mail/spamilter/Makefile +++ b/mail/spamilter/Makefile @@ -2,7 +2,7 @@ PORTNAME= spamilter PORTVERSION= 0.60 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= mail MASTER_SITES= http://www.wanlink.com/spamilter/download/ diff --git a/mail/spamilter/files/spamilter.in b/mail/spamilter/files/spamilter.in index 645b044d61c2..ddcb1268d0a0 100644 --- a/mail/spamilter/files/spamilter.in +++ b/mail/spamilter/files/spamilter.in @@ -1,15 +1,12 @@ #!/bin/sh - +# # $FreeBSD$ - -# Start or stop spamilter - +# # PROVIDE: spamilter # REQUIRE: DAEMON # BEFORE: mail # KEYWORD: shutdown # - # Define these spamilter_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local @@ -19,26 +16,30 @@ # # spamilter_flags Flags to spamilter -spamilter_enable=${spamilter_enable:-"NO"} # Enable spamilter-milter - . /etc/rc.subr name="spamilter" +desc="Spamilter (SPAM Milter) Daemon" rcvar="spamilter_enable" + +load_rc_config $name + +: ${spamilter_enable:="NO"} + command="%%PREFIX%%/bin/spamilter" pidfile="/tmp/Spamilter.pid" required_files="%%PREFIX%%/etc/spamilter.rc" start_precmd="spamilter_prestart" stop_postcmd="spamilter_poststop" -spamilter_prestart() { +spamilter_prestart() +{ /bin/rm -f "${pidfile}" } -spamilter_poststop() { +spamilter_poststop() +{ /bin/rm -f "${pidfile}" } -load_rc_config $name - run_rc_command "$1" diff --git a/mail/vbsfilter/Makefile b/mail/vbsfilter/Makefile index a0f1a116b516..4277990d8774 100644 --- a/mail/vbsfilter/Makefile +++ b/mail/vbsfilter/Makefile @@ -2,7 +2,7 @@ PORTNAME= vbsfilter PORTVERSION= 1.15 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= ftp://ftp.dinoex.de/pub/approved/ EXTRACT_SUFX= .c diff --git a/mail/vbsfilter/files/vbsfilter.in b/mail/vbsfilter/files/vbsfilter.in index 608d173965c1..0f7c24188dd6 100644 --- a/mail/vbsfilter/files/vbsfilter.in +++ b/mail/vbsfilter/files/vbsfilter.in @@ -1,15 +1,15 @@ #!/bin/sh - +# # $FreeBSD$ - +# # Start or stop vbsfilter - +# # PROVIDE: vbsfilter # REQUIRE: DAEMON # BEFORE: mail # KEYWORD: shutdown # - +# # Define these vbsfilter_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local @@ -19,30 +19,30 @@ # # vbsfilter_flags Flags to vbsfilter -vbsfilter_enable=${vbsfilter_enable:-"NO"} # Enable vbsfilter-milter -vbsfilter_socket=${vbsfilter_socket:-"/var/run/vbsfilter"} # Path to socket - . /etc/rc.subr name="vbsfilter" +desc="Vbs Attatchment Milter Daemon" rcvar="vbsfilter_enable" + +load_rc_config $name + +: ${vbsfilter_enable:="NO"} +: ${vbsfilter_socket:="/var/run/vbsfilter"} command="%%PREFIX%%/libexec/vbsfilter" +command_args="-p local:${vbsfilter_socket}" procname="${command}" start_precmd="vbsfilter_prestart" stop_postcmd="vbsfilter_poststop" -vbsfilter_prestart() { +vbsfilter_prestart() +{ /bin/rm -f "${vbsfilter_socket}" } -vbsfilter_poststop() { +vbsfilter_poststop() +{ /bin/rm -f "${vbsfilter_socket}" } -load_rc_config $name - -command_args="-p local:${vbsfilter_socket}" - run_rc_command "$1" - -# eof diff --git a/net/miniupnpc/Makefile b/net/miniupnpc/Makefile index fb5cbe3cedb8..195998e6e8bb 100644 --- a/net/miniupnpc/Makefile +++ b/net/miniupnpc/Makefile @@ -2,7 +2,7 @@ PORTNAME= miniupnpc PORTVERSION= 2.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES?= net MASTER_SITES= http://miniupnp.free.fr/files/ diff --git a/net/miniupnpc/files/miniupnpc.in b/net/miniupnpc/files/miniupnpc.in index 04561515d2a9..92020e650e49 100644 --- a/net/miniupnpc/files/miniupnpc.in +++ b/net/miniupnpc/files/miniupnpc.in @@ -1,34 +1,37 @@ #!/bin/sh +# +# $FreeBSD$ +# # PROVIDE: miniupnpc # REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv # KEYWORD: shutdown - -. /etc/rc.subr - +# # Add the following lines to /etc/rc.conf to enable miniupnpc # miniupnpc_enable="YES" # miniupnpc_config="port protocol [port2 protocol2] [...]" +. /etc/rc.subr + name="miniupnpc" +desc="MiniUPnP Client Startup Config" rcvar=miniupnpc_enable load_rc_config $name -miniupnpc_enable=${miniupnpc_enable:-"NO"} - +: ${miniupnpc_enable:="NO"} command="%%PREFIX%%/bin/upnpc" start_cmd="miniupnpc_start" stop_cmd="miniupnpc_stop" -miniupnpc_start() { +miniupnpc_start() +{ eval "${command} -r ${miniupnpc_config} | grep duration" } -miniupnpc_stop() { +miniupnpc_stop() +{ echo "Remove redirections" ${miniupnpc_config} eval ${command} -d ${miniupnpc_config} > /dev/null } run_rc_command "$1" - -# eof diff --git a/security/tinc-devel/Makefile b/security/tinc-devel/Makefile index 412f7d2769c2..de42cd6cab3c 100644 --- a/security/tinc-devel/Makefile +++ b/security/tinc-devel/Makefile @@ -2,7 +2,7 @@ PORTNAME= tinc PORTVERSION= 1.1pre17 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= security net-vpn MASTER_SITES= https://www.tinc-vpn.org/packages/ \ http://www.tinc-vpn.org/packages/ diff --git a/security/tinc-devel/files/tincd.in b/security/tinc-devel/files/tincd.in index e6ffff60a737..99085ad84352 100644 --- a/security/tinc-devel/files/tincd.in +++ b/security/tinc-devel/files/tincd.in @@ -1,10 +1,11 @@ #!/bin/sh - +# # $FreeBSD$ # # PROVIDE: tincd # REQUIRE: ipfilter FILESYSTEMS sysctl netif # BEFORE: SERVERS routing +# KEYWORD: shutdown # # Define these tincd_* variables in one of these files: # /etc/rc.conf @@ -20,12 +21,15 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE -tincd_enable=${tincd_enable:-"NO"} - . /etc/rc.subr name="tincd" +desc="Tinc VPN Daemon" rcvar="tincd_enable" + +load_rc_config $name + +: ${tincd_enable:="NO"} command="%%PREFIX%%/sbin/tinc" start_cmd="tincd_start" stop_cmd="tincd_stop" @@ -35,8 +39,6 @@ extra_commands="reload" procname=${command:-tincd} ldconfig_command="/sbin/ldconfig" -load_rc_config $name - tincd_start() { ${ldconfig_command} -elf -m %%LOCALBASE%%/lib @@ -51,12 +53,13 @@ tincd_start() $command -n $cfg start $tincd_flags done fi -# code deliberately borrowed from /etc/rc.d/netif + # code deliberately borrowed from /etc/rc.d/netif if [ -f /etc/rc.d/ipfilter ] ; then # Resync ipfilter /etc/rc.d/ipfilter quietresync fi } + tincd_stop() { if test -z "${tincd_cfg}" @@ -72,6 +75,7 @@ tincd_stop() fi wait_for_pids $rc_pid } + tincd_reload() { if test -z "${tincd_cfg}" @@ -86,7 +90,9 @@ tincd_reload() done fi } -tincd_status_network() { + +tincd_status_network() +{ if [ -n "$rc_pid" ]; then echo "${name} for ${cfg} is running as pid $rc_pid." else @@ -94,6 +100,7 @@ tincd_status_network() { return 1 fi } + tincd_status() { if test -z "${tincd_cfg}" @@ -111,4 +118,3 @@ tincd_status() } run_rc_command "$1" -# eof diff --git a/security/tinc/Makefile b/security/tinc/Makefile index 9413cf2df4b7..f7ceb7162a88 100644 --- a/security/tinc/Makefile +++ b/security/tinc/Makefile @@ -3,7 +3,7 @@ PORTNAME= tinc PORTVERSION= 1.0.36 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security net-vpn MASTER_SITES= https://www.tinc-vpn.org/packages/ \ http://www.tinc-vpn.org/packages/ diff --git a/security/tinc/files/tincd.in b/security/tinc/files/tincd.in index 4a7c965cd815..c3f1e7acb9c3 100644 --- a/security/tinc/files/tincd.in +++ b/security/tinc/files/tincd.in @@ -1,10 +1,11 @@ #!/bin/sh - +# # $FreeBSD$ # # PROVIDE: tincd # REQUIRE: ipfilter FILESYSTEMS sysctl netif # BEFORE: SERVERS routing +# KEYWORD: shutdown # # Define these tincd_* variables in one of these files: # /etc/rc.conf @@ -20,12 +21,15 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE -tincd_enable=${tincd_enable:-"NO"} - . /etc/rc.subr name="tincd" +desc="Tinc VPN Daemon" rcvar="tincd_enable" + +load_rc_config $name + +: ${tincd_enable:="NO"} command="%%PREFIX%%/sbin/tincd" start_cmd="tincd_start" stop_cmd="tincd_stop" @@ -35,8 +39,6 @@ extra_commands="reload" procname=${command:-tincd} ldconfig_command="/sbin/ldconfig" -load_rc_config $name - tincd_start() { ${ldconfig_command} -elf -m %%LOCALBASE%%/lib @@ -51,12 +53,13 @@ tincd_start() $command -n $cfg $tincd_flags done fi -# code deliberately borrowed from /etc/rc.d/netif + # code deliberately borrowed from /etc/rc.d/netif if [ -f /etc/rc.d/ipfilter ] ; then # Resync ipfilter /etc/rc.d/ipfilter quietresync fi } + tincd_stop() { if test -z "${tincd_cfg}" @@ -72,6 +75,7 @@ tincd_stop() fi wait_for_pids $rc_pid } + tincd_reload() { if test -z "${tincd_cfg}" @@ -86,7 +90,9 @@ tincd_reload() done fi } -tincd_status_network() { + +tincd_status_network() +{ rc_pid=$(check_pidfile "$pidfile" "$_procname" "$command_interpreter") if [ -n "$rc_pid" ]; then echo "${name} for ${cfg} is running as pid $rc_pid." @@ -95,6 +101,7 @@ tincd_status_network() { return 1 fi } + tincd_status() { if test -z "${tincd_cfg}" @@ -112,4 +119,3 @@ tincd_status() } run_rc_command "$1" -# eof diff --git a/sysutils/xe-guest-utilities/Makefile b/sysutils/xe-guest-utilities/Makefile index eb995757e33c..b8c000d1ed87 100644 --- a/sysutils/xe-guest-utilities/Makefile +++ b/sysutils/xe-guest-utilities/Makefile @@ -3,7 +3,7 @@ PORTNAME= xe-guest-utilities PORTVERSION= 6.2.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils MASTER_SITES= LOCAL/feld DISTNAME= ${PORTNAME}-6.0.2 diff --git a/sysutils/xe-guest-utilities/files/xenguest.in b/sysutils/xe-guest-utilities/files/xenguest.in index 13ac7b68ed2d..b081e8db5192 100644 --- a/sysutils/xe-guest-utilities/files/xenguest.in +++ b/sysutils/xe-guest-utilities/files/xenguest.in @@ -15,10 +15,16 @@ . /etc/rc.subr name=xenguest +desc="Xen Guest Daemon" rcvar=xenguest_enable load_rc_config $name +command="%%PREFIX%%/sbin/xe-daemon" +pidfile=/var/run/xe-daemon.pid +command_interpreter=/bin/sh +command_args='-p ${pidfile} &' + autoxen=`sysctl kern.vm_guest` autoxen="${autoxen#kern.vm_guest: }" case "${autoxen}" in @@ -30,9 +36,4 @@ xen) ;; esac -pidfile=/var/run/xe-daemon.pid -command="%%PREFIX%%/sbin/xe-daemon" -command_interpreter=/bin/sh -command_args='-p ${pidfile} &' - run_rc_command "$1"