Add startup script.

This commit is contained in:
Munechika SUMIKAWA 2002-11-03 15:51:39 +00:00
parent 1e3c877f05
commit 27c90ba30b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=69355
4 changed files with 42 additions and 2 deletions

View file

@ -6,7 +6,7 @@
PORTNAME= totd
PORTVERSION= 1.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.pasta.cs.uit.no/pub/Vermicelli/
@ -18,5 +18,7 @@ GNU_CONFIGURE= YES
post-install:
${INSTALL_DATA} ${FILESDIR}/totd.conf.sample ${PREFIX}/etc
@${SED} 's@%PREFIX%@${LOCALBASE}@g' ${FILESDIR}/totd.sh > ${PREFIX}/etc/rc.d/totd.sh
@${CHMOD} +x ${PREFIX}/etc/rc.d/totd.sh
.include <bsd.port.mk>

18
dns/totd/files/totd.sh Normal file
View file

@ -0,0 +1,18 @@
#!/bin/sh
case "$1" in
start)
if [ -x %PREFIX%/sbin/totd ]; then
%PREFIX%/sbin/totd && echo -n ' totd'
fi
;;
stop)
/usr/bin/killall totd && echo -n ' totd'
;;
*)
echo "Usage: `basename $0` { start | stop }"
exit 64
;;
esac

View file

@ -6,7 +6,7 @@
PORTNAME= totd
PORTVERSION= 1.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.pasta.cs.uit.no/pub/Vermicelli/
@ -18,5 +18,7 @@ GNU_CONFIGURE= YES
post-install:
${INSTALL_DATA} ${FILESDIR}/totd.conf.sample ${PREFIX}/etc
@${SED} 's@%PREFIX%@${LOCALBASE}@g' ${FILESDIR}/totd.sh > ${PREFIX}/etc/rc.d/totd.sh
@${CHMOD} +x ${PREFIX}/etc/rc.d/totd.sh
.include <bsd.port.mk>

18
net/totd/files/totd.sh Normal file
View file

@ -0,0 +1,18 @@
#!/bin/sh
case "$1" in
start)
if [ -x %PREFIX%/sbin/totd ]; then
%PREFIX%/sbin/totd && echo -n ' totd'
fi
;;
stop)
/usr/bin/killall totd && echo -n ' totd'
;;
*)
echo "Usage: `basename $0` { start | stop }"
exit 64
;;
esac