]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
vnstat: Add restart command.
authorMarkus Untersee <m.untersee@buerliag.ch>
Thu, 30 Jan 2020 12:41:36 +0000 (13:41 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 26 Mar 2020 17:51:28 +0000 (17:51 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/system/vnstat

index 518b2d7c65a99608d28a2888ffdd94d4f2e3ac87..363307013ddbcd99b1a57dfd4531abda8d8e880e 100755 (executable)
@@ -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