From: Michael Tremer Date: Tue, 12 May 2026 15:35:59 +0000 (+0100) Subject: knot-resolver: Add initscript for the GC daemon X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=75909361a2fcbb47c0bbeff2b02f3fba8a877ff2;p=ipfire-2.x.git knot-resolver: Add initscript for the GC daemon Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/common/aarch64/initscripts b/config/rootfiles/common/aarch64/initscripts index dc8c87681..080bcaa02 100644 --- a/config/rootfiles/common/aarch64/initscripts +++ b/config/rootfiles/common/aarch64/initscripts @@ -30,6 +30,7 @@ etc/rc.d/init.d/functions etc/rc.d/init.d/grub-btrfsd etc/rc.d/init.d/halt etc/rc.d/init.d/ipsec +etc/rc.d/init.d/kres-cache-gc etc/rc.d/init.d/kresd etc/rc.d/init.d/leds etc/rc.d/init.d/lldpd diff --git a/config/rootfiles/common/riscv64/initscripts b/config/rootfiles/common/riscv64/initscripts index c0a4bd5e9..9fdb165fc 100644 --- a/config/rootfiles/common/riscv64/initscripts +++ b/config/rootfiles/common/riscv64/initscripts @@ -30,6 +30,7 @@ etc/rc.d/init.d/functions etc/rc.d/init.d/grub-btrfsd etc/rc.d/init.d/halt etc/rc.d/init.d/ipsec +etc/rc.d/init.d/kres-cache-gc etc/rc.d/init.d/kresd etc/rc.d/init.d/leds etc/rc.d/init.d/lldpd diff --git a/config/rootfiles/common/x86_64/initscripts b/config/rootfiles/common/x86_64/initscripts index c0a4bd5e9..9fdb165fc 100644 --- a/config/rootfiles/common/x86_64/initscripts +++ b/config/rootfiles/common/x86_64/initscripts @@ -30,6 +30,7 @@ etc/rc.d/init.d/functions etc/rc.d/init.d/grub-btrfsd etc/rc.d/init.d/halt etc/rc.d/init.d/ipsec +etc/rc.d/init.d/kres-cache-gc etc/rc.d/init.d/kresd etc/rc.d/init.d/leds etc/rc.d/init.d/lldpd diff --git a/src/initscripts/system/kres-cache-gc b/src/initscripts/system/kres-cache-gc new file mode 100644 index 000000000..12b7506d9 --- /dev/null +++ b/src/initscripts/system/kres-cache-gc @@ -0,0 +1,52 @@ +#!/bin/sh +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2026 IPFire Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +. /etc/sysconfig/rc +. ${rc_functions} + +case "${1}" in + start) + boot_mesg "Starting Knot Resolver Garbage Collector..." + loadproc -b /usr/sbin/kres-cache-gc \ + -c /var/cache/knot-resolver \ + -d 60000 + ;; + + stop) + boot_mesg "Stopping Knot Resolver Garbage Collector..." + killproc /usr/sbin/kres-cache-gc + ;; + + restart) + ${0} stop + sleep 1 + ${0} start + ;; + + status) + statusproc /usr/sbin/kres-cache-gc + ;; + + *) + echo "Usage: ${0} {start|stop|restart|status}" + exit 1 + ;; +esac