]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/initscripts/init.d/tmpfs
Move vnstat database to /var/log/rrd
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / tmpfs
CommitLineData
d34d9f3b
AF
1#!/bin/sh
2# Begin $rc_base/init.d/tmpfs
3
4
5. /etc/sysconfig/rc
6. $rc_functions
7
8eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
9
10if [ "$RRDLOG" = '' ]; then
11 RRDLOG=/var/log/rrd
12fi
13
14case "$1" in
15 start)
16 /etc/init.d/collectd restore
17 if [ ! -e $RRDLOG.bak/vnstat ]; then
18 mkdir -p $RRDLOG.bak/vnstat
19 fi
20 ;;
21 stop)
22 /etc/init.d/collectd backup
23 ;;
24
25 *)
26 echo "Usage: $0 {start|stop}"
27 exit 1
28 ;;
29esac
30
31# End $rc_base/init.d/tmpfs