diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2020-02-23 13:51:59 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2020-02-23 14:08:49 +0100 |
commit | 1174f6d50cdeddbd43baa6d49bd4007b6d329d18 (patch) | |
tree | 5b5683dbaf46f67e4e13ca7947b1fb72a08ac857 /community/knot-resolver | |
parent | 716d804c8235305ee07b36908b70272452c1c52c (diff) | |
download | aports-1174f6d50cdeddbd43baa6d49bd4007b6d329d18.tar.bz2 aports-1174f6d50cdeddbd43baa6d49bd4007b6d329d18.tar.xz |
community/knot-resolver: redirect stdout to syslog instead of file
Diffstat (limited to 'community/knot-resolver')
-rw-r--r-- | community/knot-resolver/APKBUILD | 7 | ||||
-rw-r--r-- | community/knot-resolver/knot-resolver-openrc.post-upgrade | 4 | ||||
-rw-r--r-- | community/knot-resolver/knot-resolver.logrotate | 7 | ||||
-rw-r--r-- | community/knot-resolver/kresd.confd | 9 | ||||
-rw-r--r-- | community/knot-resolver/kresd.initd | 11 |
5 files changed, 15 insertions, 23 deletions
diff --git a/community/knot-resolver/APKBUILD b/community/knot-resolver/APKBUILD index b3aaca4010..28919f1de4 100644 --- a/community/knot-resolver/APKBUILD +++ b/community/knot-resolver/APKBUILD @@ -53,7 +53,6 @@ subpackages=" $pkgname-openrc " source="https://secure.nic.cz/files/$pkgname/$pkgname-$pkgver.tar.xz - $pkgname.logrotate kresd.confd kresd.initd kres-cache-gc.initd @@ -113,7 +112,6 @@ package() { install -m 644 -D "$srcdir"/kresd.confd ./etc/conf.d/kresd install -m 755 -D "$srcdir"/kres-cache-gc.initd ./etc/init.d/kres-cache-gc install -m 644 -D "$srcdir"/kres-cache-gc.confd ./etc/conf.d/kres-cache-gc - install -m 644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname install -d -m 750 -o kresd -g kresd ./var/cache/knot-resolver } @@ -146,8 +144,7 @@ gpgfingerprints=" " sha512sums="9d5d77d3aff082d5f0132b39627fff5cd7af6e237ded219b7b8f2156de7acacb3bf94d5e278af4bb2c9e36ea80d9259d39ba33a18bb37a626a57c70fb9dc0931 knot-resolver-5.0.1.tar.xz -688aeacb0c1f21c7e532533b402e67068897217713fb668636df7533000b493981ddfa0497f8dba7da7c804ee4ab8d587a4f52155b4e2bf1f4025d2588d314bb knot-resolver.logrotate -9c23d035ec1acedb3d946d25a55a85f13a57fc96ed2164aae9613f27e175d81b82615e88e797dff4378115eacaa497a36723fc36a1d417006e3766520bcd674e kresd.confd -e781f0d5638fcaac6bd6ab724639e493fb3e9404df02294f7c1a2433cdf15eaa4efef8907bf8c6824fa7bf6e39960a0ca7110dcd9d10522555d272184aad88ec kresd.initd +3df654ade6d8d0f584425090cae038e2ab67e99748f33a936f9401f2ac91b3364a3db34d9b16468a13909530b23665318ab9046e363cf0efd0a9f1e0b4678a96 kresd.confd +a00eb438396c955322d8b60068750bcb290d7394a7998ddaf9e114a02bee34e6b840109764ce522226d0caf012110985a8abcb5cc25856cdfb0d3dcf6910f247 kresd.initd a1e4af78ad8df36feb41619ac63aa8505cb68b434a3e01c8929f69759f5a6abe9667a6d5738928ff67daaccab58e5fecd49ce4ff439674f1e073982042a907fd kres-cache-gc.initd ad017f54aaa214862a67c8242efe9fa56dc66a8ac0012cc0f4eb981d6fd631b250378602f8f5af9916fff071d9a60d1e588e07458f8d891d19787c3b5d48cdb5 kres-cache-gc.confd" diff --git a/community/knot-resolver/knot-resolver-openrc.post-upgrade b/community/knot-resolver/knot-resolver-openrc.post-upgrade index d7013040f2..cab8b70c07 100644 --- a/community/knot-resolver/knot-resolver-openrc.post-upgrade +++ b/community/knot-resolver/knot-resolver-openrc.post-upgrade @@ -6,8 +6,8 @@ ver_old="$2" if [ "$(apk version -t "$ver_old" "5.0.1-r0")" = "<" ]; then cat >&2 <<-EOF * - * Service knot-resolver was renamed to kresd. - * Fixing runlevels for you... + * Service knot-resolver was renamed to kresd and it logs to syslog + * instead of file by default. Fixing runlevels for you... * EOF diff --git a/community/knot-resolver/knot-resolver.logrotate b/community/knot-resolver/knot-resolver.logrotate deleted file mode 100644 index a1b0fb4d4b..0000000000 --- a/community/knot-resolver/knot-resolver.logrotate +++ /dev/null @@ -1,7 +0,0 @@ -/var/log/knot-resolver.log { - notifempty - missingok - postrotate - /etc/init.d/knot-resolver --quiet --ifstarted restart - endscript -} diff --git a/community/knot-resolver/kresd.confd b/community/knot-resolver/kresd.confd index 3bef12c771..5d5873ea8b 100644 --- a/community/knot-resolver/kresd.confd +++ b/community/knot-resolver/kresd.confd @@ -6,8 +6,13 @@ # Cache (working) directory. #cachedir="/var/cache/knot-resolver" -# Path to the logging file. -#logfile="/var/log/knot-resolver.log" +# A process which will be used to log the standard output from the kresd +# process. Default is logger(1) which redirects the output to syslog. +# If you want to disable this, set output_logger="". +#output_logger="logger -t kresd -p daemon.info" + +# Path to the logging file. Default is to use the output_logger instead. +#output_log= # Uncomment to define soft dependency on kres-cache-gc. rc_want="kres-cache-gc" diff --git a/community/knot-resolver/kresd.initd b/community/knot-resolver/kresd.initd index 7297cc40a3..4405aeeb6e 100644 --- a/community/knot-resolver/kresd.initd +++ b/community/knot-resolver/kresd.initd @@ -3,16 +3,13 @@ : ${command_user:="kresd:kresd"} : ${cfgfile:=${config:-"/etc/knot-resolver/kresd.conf"}} : ${cachedir:="/var/cache/knot-resolver"} -: ${logfile:="/var/log/knot-resolver.log"} +: ${output_logger="logger -t kresd -p daemon.info"} command="/usr/sbin/kresd" command_args="--noninteractive --config=$cfgfile $cachedir" command_background="yes" pidfile="/run/$RC_SVCNAME.pid" -start_stop_daemon_args=" - --chdir=$cachedir - --stdout=$logfile - --stderr=$logfile" +start_stop_daemon_args="--chdir=$cachedir" required_files="$cfgfile" depend() { @@ -21,6 +18,6 @@ depend() { } start_pre() { - checkpath -d -m 750 -o "$command_user" "$cachedir" || return 1 - checkpath -f -m 640 -o "$command_user" /var/log/knot-resolver.log + [ "$output_log" ] && checkpath -f -m 640 -o "$command_user" "$output_log" + checkpath -d -m 750 -o "$command_user" "$cachedir" } |