From mboxrd@z Thu Jan 1 00:00:00 1970 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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6205307963115087718==" List-Id: --===============6205307963115087718== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 -- 2.18.0 --===============6205307963115087718==--