jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [rrdgraphram] - Blame information for rev 36

 

Line No. Rev Author Line
120simandl#!/bin/bash
2# chkconfig: 12345 55 45
3# description: System statistics
4 
521simandl#/etc/fstab line
6#opt /opt tmpfs rw,size=128M,nodev,mode=0755 0 0
7 
820simandlcd "/opt/HotSaNIC"
9 
10. ./settings
11 
12case $1 in
13 start)
1425simandl echo "Saving rrdtimer folder into start backup..."
15 /bin/mount / -o remount,rw,noatime
16 archiv=/optbackup.tgz
17 tar cfz $archiv /opt/HotSaNIC
1820simandl echo "Loading rrdtimer folder..."
19 posledni=`ls -c /opt_* | head -n 1 `
20 cd "/"
21 tar xfz $posledni
22 cd "/opt/HotSaNIC"
23 
24 echo "Starting rrdtimer..."
25 ./rrdtimer.pl Dp
26 ;;
27 stop)
2824simandl ./rrdgraph save
2920simandl 
30 echo "Stopping rrdtimer..."
31 if [ -e "$PIDFILE" ]; then
32 PID=`cat "$PIDFILE"`
33 for nn in $PID ; do kill $nn; done
34 else
35 echo "pid-file not found, rrdtimer not running?!"
36 fi
37 ./clearall CLEAR_COUNTERS
38 ;;
3924simandl save)
40 echo "Saving rrdtimer folder..."
41 /bin/mount / -o remount,rw,noatime
42 datum=`date '+%Y%m%d%H%M%S'`
43 archiv=/opt_$datum.tgz
44 tar cfz $archiv /opt/HotSaNIC
45 /bin/mount / -o remount,ro,noatime
46 ;;
4720simandl status)
48 if [ -e $PIDFILE ]; then
49 echo "main process on PID `cat $PIDFILE` (according to PID-file)"
50 else
51 echo "pid-file not found, rrdtimer not running?!"
52 fi
53 ;;
54 restart)
55 ./rrdgraph stop
56 ./rrdgraph start
57 ;;
58 *)
5924simandl echo "usage: rrdgraph [start|stop|status|restart|save]"
6020simandl ;;
61 esac

Powered by WebSVN 2.2.1