]> git.ipfire.org Git - ipfire-2.x.git/blame - src/initscripts/system/vnstat
unbound: Drop certificates for local control connection
[ipfire-2.x.git] / src / initscripts / system / vnstat
CommitLineData
c4a451ee
AM
1#!/bin/sh
2# Begin $rc_base/init.d/vnstat
3
4. /etc/sysconfig/rc
5. $rc_functions
6
7eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
8
9if [ "$VNSTATLOG" = '' ]; then
10 VNSTATLOG=/var/log/vnstat
11fi
12
13case "$1" in
14 start)
ee3dec50 15 if use_ramdisk; then
6146d190
MT
16 boot_mesg "Mounting vnstat ramdisk..."
17 mount_ramdisk "${VNSTATLOG}"
18 evaluate_retval
c4a451ee
AM
19 fi
20 ;;
21 stop)
6146d190 22 umount_ramdisk "${VNSTATLOG}"
c4a451ee 23 ;;
08729f79
MT
24
25 backup)
26 # Backup all data if ramdisk is used
27 if mountpoint "${RRDLOG}" &>/dev/null; then
28 ${0} restart
29 fi
30 ;;
31
c4a451ee 32 *)
08729f79 33 echo "Usage: $0 {start|stop|backup}"
c4a451ee
AM
34 exit 1
35 ;;
36esac
37
38# End $rc_base/init.d/vnstat