From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] vnstat: Add restart command. Date: Thu, 30 Jan 2020 13:41:36 +0100 Message-ID: <20200130124136.2653-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4173491228143631384==" List-Id: --===============4173491228143631384== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit From: Markus Untersee Signed-off-by: Stefan Schantl --- src/initscripts/system/vnstat | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/initscripts/system/vnstat b/src/initscripts/system/vnstat index 518b2d7c6..363307013 100755 --- a/src/initscripts/system/vnstat +++ b/src/initscripts/system/vnstat @@ -21,7 +21,11 @@ case "$1" in stop) umount_ramdisk "${VNSTATLOG}" ;; - + restart) + ${0} stop + sleep 1 + ${0} start + ;; backup) # Backup all data if ramdisk is used if mountpoint "${RRDLOG}" &>/dev/null; then @@ -30,7 +34,7 @@ case "$1" in ;; *) - echo "Usage: $0 {start|stop|backup}" + echo "Usage: $0 {start|stop|restart|backup}" exit 1 ;; esac -- 2.25.0 --===============4173491228143631384==--