summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot2021-11-02 00:07:49 +0100
committerroot2021-11-02 00:07:49 +0100
commit7b639ea16f39317f51eab31d50a87c3f6a7d5555 (patch)
tree2b05cf0e5eef494ad0de7f23d8a11023a8f48ba8
downloadaur-7b639ea16f39317f51eab31d50a87c3f6a7d5555.tar.gz
Initial Commit.
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD42
-rw-r--r--copying-info.txt2
-rw-r--r--minissdpd-openrc.install5
-rw-r--r--minissdpd.conf.d32
-rwxr-xr-xminissdpd.openrc-initd84
6 files changed, 189 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c8ba16fef1e1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = minissdpd-openrc
+ pkgdesc = OpenRC init script for minissdpd daemon.
+ pkgver = 20211101.1
+ pkgrel = 6
+ url = http://miniupnp.free.fr/minissdpd.html
+ install = minissdpd-openrc.install
+ arch = any
+ license = GPL3
+ depends = minissdpd
+ optdepends = openrc: To make use of this initscript.
+ options = !emptydirs
+ backup = etc/conf.d/minissdpd
+ source = minissdpd.conf.d
+ source = minissdpd.openrc-initd
+ source = copying-info.txt
+ source = license-gpl3.txt::https://www.gnu.org/licenses/gpl-3.0.txt
+ source = minissdpd-openrc.install
+ sha256sums = 270810bc090a6d4cee27f535e5dd8748ceb5d514e012d5ae8336e88840de4d30
+ sha256sums = ab36444ff69daa7fb2a7c9f676e672215a94ee0a6a3b3ee369f797d53d001739
+ sha256sums = 8921a140fb29beec3e9a32cfc9a85c99d1c8718db806656cc443cbaf2bee8f1a
+ sha256sums = 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986
+ sha256sums = 0edf2cf0a848660aaf790b0f151474bcc736aa29ed4e740c022b24d7716bbde1
+
+pkgname = minissdpd-openrc
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..35a2405a623c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: dreieck
+
+_pkgname=minissdpd-openrc
+pkgname="${_pkgname}"
+pkgver=20211101.1
+pkgrel=6
+pkgdesc='OpenRC init script for minissdpd daemon.'
+url='http://miniupnp.free.fr/minissdpd.html'
+license=('GPL3')
+arch=('any')
+depends=('minissdpd')
+makedepends=()
+optdepends=('openrc: To make use of this initscript.')
+provides=()
+replaces=()
+conflicts=()
+backup=(etc/conf.d/minissdpd)
+options=('!emptydirs')
+install="${_pkgname}.install"
+source=(
+ 'minissdpd.conf.d'
+ 'minissdpd.openrc-initd'
+ 'copying-info.txt'
+ 'license-gpl3.txt::https://www.gnu.org/licenses/gpl-3.0.txt'
+ "${install}"
+)
+sha256sums=(
+ '270810bc090a6d4cee27f535e5dd8748ceb5d514e012d5ae8336e88840de4d30' # minissdpd.conf.d
+ 'ab36444ff69daa7fb2a7c9f676e672215a94ee0a6a3b3ee369f797d53d001739' # minissdpd.openrc-initd
+ '8921a140fb29beec3e9a32cfc9a85c99d1c8718db806656cc443cbaf2bee8f1a' # copying-info.txt
+ '3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986' # license-gpl3.txt
+ '0edf2cf0a848660aaf790b0f151474bcc736aa29ed4e740c022b24d7716bbde1' # $install
+)
+
+package() {
+ install -D -v -m755 "${srcdir}/minissdpd.openrc-initd" "${pkgdir}/etc/init.d/minissdpd"
+ install -D -v -m644 "${srcdir}/minissdpd.conf.d" "${pkgdir}/etc/conf.d/minissdpd"
+
+ for _license in 'copying-info.txt' 'license-gpl3.txt'; do
+ install -D -v -m644 "${srcdir}/${_license}" "${pkgdir}/usr/share/licenses/${pkgname}/${_license}"
+ done
+}
diff --git a/copying-info.txt b/copying-info.txt
new file mode 100644
index 000000000000..eace8cd07535
--- /dev/null
+++ b/copying-info.txt
@@ -0,0 +1,2 @@
+'touchegg-openrc' is licensed under GNU General Public License, version 3.0.
+See https://www.gnu.org/licenses/gpl-3.0.en.html for the license text.
diff --git a/minissdpd-openrc.install b/minissdpd-openrc.install
new file mode 100644
index 000000000000..02c8cde3c909
--- /dev/null
+++ b/minissdpd-openrc.install
@@ -0,0 +1,5 @@
+post_install() {
+ printf '%s\n' " > IMPORTANT: You _must_ set the _IFACE-variable in /etc/conf.d/minissdpd"
+ printf '%s\n' " to an IP-address or network interface to make sense of the software."
+ printf '%s\n' " Installation default is the loopback interface."
+}
diff --git a/minissdpd.conf.d b/minissdpd.conf.d
new file mode 100644
index 000000000000..3b6c293a2c74
--- /dev/null
+++ b/minissdpd.conf.d
@@ -0,0 +1,32 @@
+### Configuration for the minissdpd-Daemon -- overrides the defaults set in /etc/init.d/minissdpd.
+
+# Where to listen on -- specify either an IPv4 address with mask (e.g. "192.168.1.42/255.255.255.0"), or a network interface name (e.g. "eth0"). Can be multiple entries, specified as a bash array. Note that the interface(s) must be up at the time the daemon is started. NOTE: Network address specification might not work and throw an error, try it out.
+# _IFACE=192.168.1.42/255.255.255.0
+# _IFACE=eth0
+# _IFACE=wlan0
+# _IFACE=(eth0 wlan0)
+_IFACE=lo
+
+# Use the following PID-file:
+_PIDFILE="/var/run/minissdpd.pid"
+
+# Communicate via the following socket:
+_SOCKET="/var/run/minissdpd.sock"
+
+# The exeecutable to run
+_DAEMON="/usr/bin/minissdpd"
+
+# Should we enable IPv6 in addidion to IPv4?
+_IP6="true"
+
+# TTL of the package. By default 2 is used according to UDA.
+_TTL=2
+
+# search/filter a specific device type. Leave commented out to not apply the filter.
+#_DEVFILTER=devtype
+
+# Should we generate log/ debug output?
+_DEBUG="false"
+
+# Logfile which is used in case $_DEBUG is true
+_LOGFILE="/var/log/minissdpd.log"
diff --git a/minissdpd.openrc-initd b/minissdpd.openrc-initd
new file mode 100755
index 000000000000..5958e37b21e0
--- /dev/null
+++ b/minissdpd.openrc-initd
@@ -0,0 +1,84 @@
+#!/sbin/openrc-run
+
+depend() {
+ before miniupnpd minidlna
+ after net
+}
+
+
+### The following configuration settings can be set in /etc/conf.d/minissdpd -- note that "_IFACE" _must_ be set there!, for the others "minissdpd" has defaults:
+# _IFACE -- Where to listen on -- specify either an IPv4 address with mask (e.g. "192.168.1.42/255.255.255.0"), or a network interface name (e.g. "eth0"). Can be multiple entries, specified as a bash array.
+# _PIDFILE -- Use the following PID-file:
+# _SOCKET -- Communicate via the following socket:
+# _IP6 -- Should we enable IPv6 in addidion to IPv4?
+# _TTL -- TTL of the package. By default 2 is used according to UDA.
+# _DEVFILTER -- search/filter a specific device type. Leave unset out to not apply the filter.
+# _DEBUG -- Should we generate log/ debug output?
+# _LOGFILE -- Logfile whis is used in case $_DEBUG is true
+
+
+# The exeecutable to run
+_DAEMON="/usr/bin/minissdpd"
+
+
+if [ -z "${_SOCKET}" ]; then
+ _SOCKET='/var/run/minissdpd.sock'
+fi
+if [ -z "${_PIDFILE}" ]; then
+ _PIDFILE='/var/run/minissdpd.pid'
+fi
+
+# The options for the daemon
+_DAEMON_ARGS=(
+ '-s' "${_SOCKET}"
+ '-p' "${_PIDFILE}"
+)
+
+if [ -n "${_TTL}" ]; then
+ _DAEMON_ARGS+=('-t' "${_TTL}")
+fi
+if [ -n "${_DEVFILTER}" ]; then
+ _DAEMON_ARGS+=('-f' "${_DEVFILTER}")
+fi
+
+for _if in "${_IFACE[@]}"; do
+ _DAEMON_ARGS+=('-i' "${_if}")
+done
+
+if "${_IP6}"; then
+ _DAEMON_ARGS+=('-6')
+fi
+
+if "${_DEBUG}"; then
+ _DAEMON_ARGS+=('-d')
+ _STARTSTOPDAEMON_DEBUG_ARGS=(
+ '--background'
+ '-1' "${_LOGFILE}" '-2' "${_LOGFILE}"
+ )
+else
+ _STARTSTOPDAEMON_DEBUG_ARGS=()
+fi
+
+
+start() {
+ ebegin "Starting $(basename "${_DAEMON}")"
+
+ if [ -z "${_IFACE}" ]; then
+ printf '%s\n' "Error: Variable '_IFACE' must be set in '/etc/conf.d/'."
+ fi
+
+ # Create $_PIDFILE
+ touch "${_PIDFILE}"
+
+ start-stop-daemon --pidfile "${_PIDFILE}" --start --verbose "${_STARTSTOPDAEMON_DEBUG_ARGS[@]}" --exec "${_DAEMON}" -- "${_DAEMON_ARGS[@]}"
+
+ eend "$?"
+}
+
+stop() {
+ ebegin "Stopping $(basename "${_DAEMON}")"
+
+ start-stop-daemon --pidfile "${_PIDFILE}" --stop --verbose
+
+ eend "$?"
+}