aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Polański <michal@polanski.me>2020-10-08 23:38:15 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-10-09 00:08:48 +0000
commitf57c5ba1f14c3fc3f55ebb457eba2caccef97e82 (patch)
tree0564138561b951d013a647319712716713e846f8
parente02b59bc900af59850131defa6b58a9018874425 (diff)
downloadaports-f57c5ba1f14c3fc3f55ebb457eba2caccef97e82.tar.gz
aports-f57c5ba1f14c3fc3f55ebb457eba2caccef97e82.tar.bz2
aports-f57c5ba1f14c3fc3f55ebb457eba2caccef97e82.tar.xz
main/ulogd: use supervise-daemon
-rw-r--r--main/ulogd/APKBUILD15
-rw-r--r--main/ulogd/ulogd.confd6
-rw-r--r--main/ulogd/ulogd.initd39
3 files changed, 28 insertions, 32 deletions
diff --git a/main/ulogd/APKBUILD b/main/ulogd/APKBUILD
index 56d21beb99..505bc4bbd9 100644
--- a/main/ulogd/APKBUILD
+++ b/main/ulogd/APKBUILD
@@ -1,9 +1,10 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
+# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ulogd
pkgver=2.0.7
-pkgrel=6
-pkgdesc="A userspace logging daemon for netfilter/iptables related logging"
+pkgrel=7
+pkgdesc="Userspace logging daemon for netfilter/iptables related logging"
url="https://netfilter.org/projects/ulogd/"
arch="all"
license="GPL-2.0-only"
@@ -45,9 +46,9 @@ build() {
package() {
make DESTDIR="$pkgdir" install
install -Dm644 ulogd.conf "$pkgdir"/etc/ulogd.conf
- install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
- install -m644 -D "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
install -dm755 "$pkgdir"/usr/share/doc/ulogd
install -Dm644 ulogd.conf "$pkgdir"/usr/share/doc/ulogd/ulogd.conf.sample
install -Dm644 doc/ulogd.sgml "$pkgdir"/usr/share/doc/ulogd/ulogd.sgml
@@ -77,6 +78,6 @@ _plugin() {
}
sha512sums="1ad12bcf91bebe8bf8580de38693318cdabd17146f1f65acf714334885cf13adf5f783abdf2dd67474ef12f82d2cfb84dd4859439bc7af10a0df58e4c7e48b09 ulogd-2.0.7.tar.bz2
f65e051520645c5e1618b1ef9d570ebac77ec8d05972c9b58ca93475a9612a725b26634a71e9fb8e117ae004a2dc13da2a1368b549d2808bd299e39b8f8d6bab musl-fixes.patch
-ab60e367a18d6dafcf5ee22562e303d74944f97b1e42717607db85f11d15d94be3e0e9aaa422c2bac13cdeee1aabc550f751f3e6419b1c7b16d86d0ee8fad55a ulogd.initd
-bdae1ff90c671b6847dfda1947a33e24bfbe16ad963f85769d923ba33021bc4ca315fd410b46fac102f0a24e879e4be4ad7bb5978c5a6755e74e6b5d7c3e18ee ulogd.confd
+8bfe0c6058a8f78af4d98895e6c757a11818f06e56d801792999a3de57abfdd6f4a2ae4fd41c4013230e55d90df4a01b7855fd0bf42c815673987f8747310203 ulogd.initd
+927475edf73605117ffaa6ae26316151b4c2cef6f49d2f552d0d57f2e294fc3799169c40db95b10d59a34d2176c1e0c263a7786aa4651d34a337fa906294950c ulogd.confd
76d426411786010b73900b41cf2537c704cf48abbe464d10760d44420fd46fea72ae84f6b52c7c338f39630666ebe06ef05287d18e7dd7c5662bb72af0491b0e ulogd.logrotate"
diff --git a/main/ulogd/ulogd.confd b/main/ulogd/ulogd.confd
index ac035b24c9..6c4122ef42 100644
--- a/main/ulogd/ulogd.confd
+++ b/main/ulogd/ulogd.confd
@@ -1,2 +1,4 @@
-# Argument to be passed to ulog daemon
-ARGS="-d"
+# Configuration for /etc/init.d/ulogd
+
+# See ulogd(8) for available options
+#ulogd_opts=""
diff --git a/main/ulogd/ulogd.initd b/main/ulogd/ulogd.initd
index 754cf2a3bc..a9b7b8972a 100644
--- a/main/ulogd/ulogd.initd
+++ b/main/ulogd/ulogd.initd
@@ -1,12 +1,16 @@
#!/sbin/openrc-run
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-admin/ulogd/files/ulogd,v 1.2 2004/07/13 16:32:25 aliz Exp $
+supervisor=supervise-daemon
-description="Netfilter userspace log daemon"
-description_reload="Reload configuration"
+name="ulogd"
+description="Netfilter userspace logging daemon"
+command="/usr/sbin/ulogd"
extra_started_commands="reload"
+description_reload="Reload configuration"
+
+command_args="$ulogd_opts"
+command_user=root:wheel
+umask=027
depend() {
before firewall
@@ -14,28 +18,17 @@ depend() {
checkconfig() {
if [ ! -e /etc/ulogd.conf ]; then
- eerror "You need /etc/ulogd.conf"
+ eerror "/etc/ulogd.conf is missing"
return 1
fi
}
-start() {
- checkconfig || return 1
- ebegin "Starting ulogd"
- start-stop-daemon --start --quiet --exec /usr/sbin/ulogd --group wheel \
- --umask 027 -- $ARGS >/dev/null 2>&1
- eend $?
-}
-
-stop() {
- ebegin "Stopping ulogd"
- start-stop-daemon --stop --quiet --exec /usr/sbin/ulogd >/dev/null 2>&1
- eend $?
-}
-
reload() {
- ebegin "Reloading ulogd.conf file"
- killall -HUP ulogd &>/dev/null
+ ebegin "Reloading $name"
+ supervise-daemon $RC_SVCNAME --signal HUP
eend $?
-}
+}
+start_pre() {
+ checkconfig || return $?
+}