Add startup script.
This commit is contained in:
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
|
@ -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
18
dns/totd/files/totd.sh
Normal 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
|
|
@ -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
18
net/totd/files/totd.sh
Normal 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
|
Loading…
Reference in a new issue