aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormharo <mharo@FreeBSD.org>2001-01-08 02:57:24 +0800
committermharo <mharo@FreeBSD.org>2001-01-08 02:57:24 +0800
commit858928c218c33ab9f4caae7cdf6190bf774f631f (patch)
treeefa8876dafb568e1967cc7f9dc8cbff3cd0cbcb3 /net
parent358dbf2f567e9fc72e6651a2be92f61ceb71da11 (diff)
downloadfreebsd-ports-graphics-858928c218c33ab9f4caae7cdf6190bf774f631f.tar.gz
freebsd-ports-graphics-858928c218c33ab9f4caae7cdf6190bf774f631f.tar.zst
freebsd-ports-graphics-858928c218c33ab9f4caae7cdf6190bf774f631f.zip
add an example of a PREFIX/rc.d/iplog.sh script for startup as daemon.
PR: 24128 Submitted by: MAINTAINER
Diffstat (limited to 'net')
-rw-r--r--net/iplog/Makefile4
-rw-r--r--net/iplog/files/iplog.sh.tmpl15
-rw-r--r--net/iplog/pkg-plist1
3 files changed, 20 insertions, 0 deletions
diff --git a/net/iplog/Makefile b/net/iplog/Makefile
index d26f6c28535..5049552fc33 100644
--- a/net/iplog/Makefile
+++ b/net/iplog/Makefile
@@ -39,6 +39,10 @@ post-install:
@${ECHO_MSG} "See ${PREFIX}/etc/example-iplog.conf for an example"
@${ECHO_MSG} "============================================================================"
@${ECHO_MSG}
+ @${ECHO_MSG} "Installing ${PREFIX}/etc/rc.d/iplog.sh.sample file."
+ @${CAT} ${FILESDIR}/iplog.sh.tmpl | \
+ ${SED} -e 's;PREFIX;${PREFIX};' \
+ > ${PREFIX}/etc/rc.d/iplog.sh.sample
.endif
.include <bsd.port.post.mk>
diff --git a/net/iplog/files/iplog.sh.tmpl b/net/iplog/files/iplog.sh.tmpl
new file mode 100644
index 00000000000..6653b64baf6
--- /dev/null
+++ b/net/iplog/files/iplog.sh.tmpl
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+
+umask 022
+arg=${1:-start}
+
+test -x PREFIX/sbin/iplog || exit 1
+echo -n " iplog"
+
+case $arg in
+start)
+ PREFIX/sbin/iplog -d -z;;
+stop)
+ killall iplog;;
+esac
diff --git a/net/iplog/pkg-plist b/net/iplog/pkg-plist
index 6c24cb03e9d..d3e90e6094f 100644
--- a/net/iplog/pkg-plist
+++ b/net/iplog/pkg-plist
@@ -1,4 +1,5 @@
sbin/iplog
@unexec if cmp -s %D/etc/iplog.conf %D/etc/example-iplog.conf; then rm -f %D/etc/iplog.conf; fi
etc/example-iplog.conf
+etc/rc.d/iplog.sh.sample
@exec test -f %B/iplog.conf || cp %B/%f %B/iplog.conf