From patchwork Fri Apr 10 17:17:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 2924 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48zPpF3GCPz3yBt for ; Fri, 10 Apr 2020 17:17:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48zPpB6rdLz1XQ; Fri, 10 Apr 2020 17:17:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48zPpB0Zgvz2xgV; Fri, 10 Apr 2020 17:17:22 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48zPp70Ygcz2xq9 for ; Fri, 10 Apr 2020 17:17:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48zPp669y9z2jl for ; Fri, 10 Apr 2020 17:17:18 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1586539038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=24FBiBVMzMfYXDS1LrzbQnW/RxFo2VBMhsd6OvtQNns=; b=I23praGKiZsFOzTC+n0D5Yh5S2sLZn9DxBjzWEfhqVqZNpXfDHaSWCZGVSK3l78Jg6KF4Z RFe/mfhE/dBROXDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1586539038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=24FBiBVMzMfYXDS1LrzbQnW/RxFo2VBMhsd6OvtQNns=; b=c/OWdDaydbyCOWW7b/8J/a+YO1bBiJcUNtNHP68OKXv/zKFyhTU3z33e1SX61g3jZGVGnO iU56vGMi6crAzt38Z/azpdPe9oEnPYeZSMVoSPMFAYcQO9UI2NQb0VMOPMPtxiE5NubgT6 pFmzPccFdjvuvhyaEafWLWJjghsMLzsPx5e3X5rkrLWALnPkbKdbCAvVTOhvi2QcfitksM sacI35UooxNZmzjdB1qvctCRCjzDtOmDSt3peDj/ycLNg4yJw+AXdAoqNNSXwat+K28z/Y 6yImmZ6ya4HikItMYmGOde5H7Qy7T2tLl2MwSmR/zzAV6pXEDHdePJowp8DlAw== From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH 3/4] vnstat 2.6: New initscript Date: Fri, 10 Apr 2020 19:17:10 +0200 Message-Id: <20200410171711.3902-3-matthias.fischer@ipfire.org> In-Reply-To: <20200410171711.3902-1-matthias.fischer@ipfire.org> References: <20200410171711.3902-1-matthias.fischer@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=matthias.fischer@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Added the new 'vnstatd' daemon to 'start' and 'stop' section. Signed-off-by: Matthias Fischer --- src/initscripts/system/vnstat | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat index 363307013..bcc19c3ab 100755 --- a/src/initscripts/system/vnstat +++ b/src/initscripts/system/vnstat @@ -17,15 +17,28 @@ case "$1" in mount_ramdisk "${VNSTATLOG}" evaluate_retval fi + + boot_mesg "Starting vnstatd..." + loadproc /usr/sbin/vnstatd -d --alwaysadd + sleep 2 + evaluate_retval ;; + stop) + boot_mesg "Stopping vnstatd..." + killproc /usr/sbin/vnstatd + sleep 2 + evaluate_retval + umount_ramdisk "${VNSTATLOG}" ;; + restart) ${0} stop sleep 1 ${0} start ;; + backup) # Backup all data if ramdisk is used if mountpoint "${RRDLOG}" &>/dev/null; then