- add documentation
- add proper statup script (untested)
This commit is contained in:
parent
0e47205143
commit
b2a611055f
4 changed files with 36 additions and 45 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.5 2005/07/19 22:49:42 adrian_p Exp $
|
||||
# $NetBSD: Makefile,v 1.6 2005/07/20 00:21:00 adrian_p Exp $
|
||||
|
||||
DISTNAME= smX-${VERSION}
|
||||
PKGNAME= sendmailX-${VERSION}
|
||||
|
@ -23,6 +23,7 @@ VERSION= 0.0.Alpha8.0
|
|||
USERMOD?= /usr/sbin/usermod
|
||||
|
||||
EGDIR= ${PREFIX}/share/examples/smX
|
||||
DOCDIR= ${PREFIX}/share/doc/smX
|
||||
FILES_SUBST+= PREFIX=${PREFIX} SMXCNF=${SMXCNF} USERMOD=${USERMOD}
|
||||
FILES_SUBST+= VARBASE=${VARBASE} HOSTNAME=${HOSTNAME}
|
||||
FILES_SUBST+= SMXETC=${PKG_SYSCONFDIR}
|
||||
|
@ -71,10 +72,13 @@ post-extract:
|
|||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${EGDIR}
|
||||
${INSTALL_DATA_DIR} ${DOCDIR}
|
||||
${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}
|
||||
${INSTALL_DATA} ${WRKDIR}/smx.conf ${EGDIR}/smx.conf
|
||||
${INSTALL_DATA} ${WRKDIR}/Makefile ${EGDIR}/Makefile
|
||||
${INSTALL_DATA} ${FILESDIR}/aliases ${EGDIR}/aliases
|
||||
${INSTALL_DATA} ${FILESDIR}/mt ${EGDIR}/mt
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/README.txt ${DOCDIR}/README.txt
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/README.html ${DOCDIR}/README.html
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.5 2005/07/19 22:49:42 adrian_p Exp $
|
||||
@comment $NetBSD: PLIST,v 1.6 2005/07/20 00:21:00 adrian_p Exp $
|
||||
bin/mailq
|
||||
bin/qmgrctl
|
||||
bin/runas
|
||||
|
@ -14,9 +14,11 @@ libexec/smar
|
|||
libexec/smtpc
|
||||
libexec/smtps
|
||||
sbin/mcp
|
||||
share/doc/smX/README.txt
|
||||
share/doc/smX/README.html
|
||||
share/examples/smX/Makefile
|
||||
share/examples/smX/aliases
|
||||
share/examples/smX/smx.conf
|
||||
share/examples/smX/mt
|
||||
share/examples/smX/smx.conf
|
||||
@dirrm include/smX
|
||||
@dirrm share/examples/smX
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
out of the box
|
||||
|
||||
- sendmailx, sendailX, smx or smX - choose one and stick to it
|
||||
- write a proper startup script
|
||||
- fix the current example smx.conf file (see TODO in the file)
|
||||
- fix files/Makefile (createmap)
|
||||
|
||||
|
|
|
@ -1,44 +1,30 @@
|
|||
#!/bin/sh
|
||||
# start sendmail X via MCP
|
||||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: sendmailx.sh,v 1.2 2005/07/20 00:21:01 adrian_p Exp $
|
||||
#
|
||||
# PROVIDE: sendmailx
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
MCPPID=mcp.pid
|
||||
MCPOUT=mcp.out
|
||||
|
||||
start_mcp()
|
||||
{
|
||||
${sbindir}/mcp -l -p \${MCPPID} ${SMXCNF} > \${MCPOUT} 2>&1 &
|
||||
}
|
||||
|
||||
stop_mcp()
|
||||
{
|
||||
if test -s \${MCPPID}; then
|
||||
kill \`head -1 \${MCPPID}\`
|
||||
else
|
||||
echo "\$0: pid file \${MCPPID} does not exist or is empty"
|
||||
fi
|
||||
}
|
||||
|
||||
if cd "${SMXQD}"; then
|
||||
:
|
||||
else
|
||||
echo "\$0: cd ${SMXQD} failed"
|
||||
exit 1
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
. /etc/rc.subr
|
||||
fi
|
||||
|
||||
case "\$1" in
|
||||
'start')
|
||||
start_mcp
|
||||
;;
|
||||
'stop')
|
||||
stop_mcp
|
||||
;;
|
||||
'restart')
|
||||
stop_mcp
|
||||
start_mcp
|
||||
;;
|
||||
*)
|
||||
echo "Usage: \$0 { start | stop | restart }"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
name="sendmailx"
|
||||
rcvar=$name
|
||||
ctl_command="@PREFIX@/sbin/mcp"
|
||||
conf_file="@PKG_SYSCONFDIR@/smx.conf"
|
||||
required_files=$conf_file
|
||||
extra_commands="restart"
|
||||
start_cmd="sendmailx_start"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
# restart_cmd="sendmailx_restart"
|
||||
|
||||
sendmailx_start()
|
||||
{
|
||||
${ctl_command} -l -p ${pidfile} ${conf_files}
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Reference in a new issue