mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-10 07:44:15 +02:00
main/mosquitto: don't force supervise-daemon and make config required
supervise-daemon is still experimental, has bad defaults and tends
to be unreliable. Users can enable supervise-daemon, if they want to,
simply by declaring `supervisor=supervise-daemon` in
/etc/conf.d/mosquitto.
See my mail from Tue, 15 Dec 2020 15:33:16 +0100 in alpine-devel
mailing-list in topic "Use of supervise-daemon in Alpine".
(I cannot simply reference it from ML archive because it's broken.)
This partially reverts 61c0b8e50e
.
I don't understand why the mosquitto config file was optional before,
it doesn't make much sense.
This commit is contained in:
parent
d6bfe67829
commit
fdeaf47b6f
3 changed files with 24 additions and 13 deletions
main/mosquitto
|
@ -2,7 +2,7 @@
|
|||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=mosquitto
|
||||
pkgver=1.6.12
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="An open source MQTT broker"
|
||||
url="https://mosquitto.org/"
|
||||
arch="all"
|
||||
|
@ -17,7 +17,9 @@ subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-libs++:_pp $pkgname
|
|||
source="http://mosquitto.org/files/source/mosquitto-$pkgver.tar.gz
|
||||
config.patch
|
||||
disable-ci-tests.patch
|
||||
mosquitto.initd"
|
||||
mosquitto.initd
|
||||
mosquitto.confd
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
# 1.6.7-r0:
|
||||
|
@ -69,6 +71,7 @@ package() {
|
|||
"$pkgdir"/etc/mosquitto/mosquitto.conf
|
||||
|
||||
install -Dm755 "$srcdir"/mosquitto.initd "$pkgdir"/etc/init.d/mosquitto
|
||||
install -Dm755 "$srcdir"/mosquitto.confd "$pkgdir"/etc/conf.d/mosquitto
|
||||
}
|
||||
|
||||
_pp() {
|
||||
|
@ -90,4 +93,5 @@ clients() {
|
|||
sha512sums="68cd2e4aa14254c0332ad78eac1f885e0e4e9f2332540d3778b8c7df096db7618b8467b5bb25f70ddc3306d01dd36eb9a9e2bf2738da77e196c7a1ccaed869d2 mosquitto-1.6.12.tar.gz
|
||||
fb000f9fa1ef94cbf3811a23b5692c0c8f9e2df945959cef6005462715e99d6f75cf6b31bd496271ffc17634024aed986771a73962fef865c0d386f6c194fb33 config.patch
|
||||
21df2006a5eb9e1248cf261e555ded8e80e79f2a2d2a55b1f8a153af7c0feb867f3b3bd71efbe4d8569e3031c65f3e144794724f012e7539244a9bd97b6b6bb3 disable-ci-tests.patch
|
||||
d5406c258351133d85fc90056d78286a0ed1defde90e68d84fa9a1d65244d2baef76fd30fd04855e4bf6fc87532ef8ff274a6b70564f09f69fc6d14b5106fef0 mosquitto.initd"
|
||||
a527813957b6f2d7afdb7269bade61d99b3023a147861b38902971929ff342a7c8c276bdb808fcfe7e48fa3e5c7521a16d777e5a3313256b8bf1e759cec5b7b0 mosquitto.initd
|
||||
678a8aaefb9181f5f4998304046e5a8737049f90cf6bbbfd5fd4549592728afe77cb536547b39ad1598d53fe0b7c03e1506b2683e7b936712b9fad4a317f4b43 mosquitto.confd"
|
||||
|
|
10
main/mosquitto/mosquitto.confd
Normal file
10
main/mosquitto/mosquitto.confd
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Configuration file for /etc/init.d/mosquitto
|
||||
|
||||
# Path to the mosquitto configuration file.
|
||||
#cfgfile="/etc/mosquitto/${RC_SVCNAME#mosquitto.}.conf"
|
||||
|
||||
# Additional arguments to pass to the mosquitto program.
|
||||
#command_args=
|
||||
|
||||
# Uncomment to use process supervisor.
|
||||
#supervisor="supervise-daemon"
|
|
@ -1,17 +1,14 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
supervisor=supervise-daemon
|
||||
|
||||
name="Mosquitto message broker"
|
||||
description="MQTT v3.1.1 Message Broker"
|
||||
|
||||
: ${cfgfile:="/etc/mosquitto/${RC_SVCNAME#mosquitto.}.conf"}
|
||||
|
||||
command="/usr/sbin/mosquitto"
|
||||
command_args="$mosquitto_args"
|
||||
# mosquitto_args is here for backward compatibility only
|
||||
command_args="-c $cfgfile ${command_args:-$mosquitto_args}"
|
||||
command_background="yes"
|
||||
pidfile="/run/$RC_SVCNAME.pid"
|
||||
|
||||
config=/etc/mosquitto/${RC_SVCNAME#mosquitto.}.conf
|
||||
|
||||
start_pre() {
|
||||
if [ -f $config ]; then
|
||||
command_args="-c $config $command_args"
|
||||
fi
|
||||
}
|
||||
required_files="$cfgfile"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue