git: 308171c8508b - main - multimedia/minisatip: Add rc.d script
Bernhard Froehlich
decke at FreeBSD.org
Mon Jun 21 14:50:03 UTC 2021
The branch main has been updated by decke:
URL: https://cgit.FreeBSD.org/ports/commit/?id=308171c8508baa96b8023f1d833b1789a84a35d9
commit 308171c8508baa96b8023f1d833b1789a84a35d9
Author: Bernhard Froehlich <decke at FreeBSD.org>
AuthorDate: 2021-06-21 14:45:52 +0000
Commit: Bernhard Froehlich <decke at FreeBSD.org>
CommitDate: 2021-06-21 14:45:52 +0000
multimedia/minisatip: Add rc.d script
---
multimedia/minisatip/Makefile | 1 +
multimedia/minisatip/files/minisatip.in | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/multimedia/minisatip/Makefile b/multimedia/minisatip/Makefile
index 59c7fcf73947..8db32f2492eb 100644
--- a/multimedia/minisatip/Makefile
+++ b/multimedia/minisatip/Makefile
@@ -20,6 +20,7 @@ GH_ACCOUNT= catalinii
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
+USE_RC_SUBR= ${PORTNAME}
GNU_CONFIGURE= yes
ALL_TARGET= minisatip
diff --git a/multimedia/minisatip/files/minisatip.in b/multimedia/minisatip/files/minisatip.in
new file mode 100644
index 000000000000..31633d1476bb
--- /dev/null
+++ b/multimedia/minisatip/files/minisatip.in
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# PROVIDE: minisatip
+# REQUIRE: DAEMON webcamd
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf[.local] to enable minisatip
+#
+# minisatip_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable minisatip.
+# minisatip_flags (str): Custom flags for minisatip
+
+. /etc/rc.subr
+
+name=minisatip
+rcvar=minisatip_enable
+
+load_rc_config $name
+
+: ${minisatip_enable:=NO}
+
+pidfile="/var/run/${name}.pid"
+command="%%PREFIX%%/sbin/minisatip"
+command_args="-g -R %%PREFIX%%/share/minisatip/html"
+
+run_rc_command "$1"
More information about the dev-commits-ports-all
mailing list