#!/bin/bash # chkconfig: 12345 55 45 # description: System statistics #/etc/fstab line #opt /opt tmpfs rw,size=128M,nodev,mode=0755 0 0 cd "/opt/HotSaNIC" . ./settings case $1 in start) echo "Saving rrdtimer folder into start backup..." /bin/mount / -o remount,rw,noatime archiv=/optbackup.tgz tar cfz $archiv /opt/HotSaNIC echo "Loading rrdtimer folder..." posledni=`ls -c /opt_* | head -n 1 ` cd "/" tar xfz $posledni cd "/opt/HotSaNIC" echo "Starting rrdtimer..." ./rrdtimer.pl Dp ;; stop) ./rrdgraph save echo "Stopping rrdtimer..." if [ -e "$PIDFILE" ]; then PID=`cat "$PIDFILE"` for nn in $PID ; do kill $nn; done else echo "pid-file not found, rrdtimer not running?!" fi ./clearall CLEAR_COUNTERS ;; save) echo "Saving rrdtimer folder..." /bin/mount / -o remount,rw,noatime datum=`date '+%Y%m%d%H%M%S'` archiv=/opt_$datum.tgz tar cfz $archiv /opt/HotSaNIC /bin/mount / -o remount,ro,noatime ;; status) if [ -e $PIDFILE ]; then echo "main process on PID `cat $PIDFILE` (according to PID-file)" else echo "pid-file not found, rrdtimer not running?!" fi ;; restart) ./rrdgraph stop ./rrdgraph start ;; *) echo "usage: rrdgraph [start|stop|status|restart|save]" ;; esac #!/bin/bash # chkconfig: 12345 55 45 # description: System statistics #/etc/fstab line #opt /opt tmpfs rw,size=128M,nodev,mode=0755 0 0 cd "/opt/HotSaNIC" . ./settings case $1 in start) echo "Loading rrdtimer folder..." posledni=`ls -c /opt_* | head -n 1 ` cd "/" tar xfz $posledni cd "/opt/HotSaNIC" echo "Starting rrdtimer..." ./rrdtimer.pl Dp ;; stop) ./rrdgraph save echo "Stopping rrdtimer..." if [ -e "$PIDFILE" ]; then PID=`cat "$PIDFILE"` for nn in $PID ; do kill $nn; done else echo "pid-file not found, rrdtimer not running?!" fi ./clearall CLEAR_COUNTERS ;; save) echo "Saving rrdtimer folder..." /bin/mount / -o remount,rw,noatime datum=`date '+%Y%m%d%H%M%S'` archiv=/opt_$datum.tgz tar cfz $archiv /opt/HotSaNIC /bin/mount / -o remount,ro,noatime ;; status) if [ -e $PIDFILE ]; then echo "main process on PID `cat $PIDFILE` (according to PID-file)" else echo "pid-file not found, rrdtimer not running?!" fi ;; restart) ./rrdgraph stop ./rrdgraph start ;; *) echo "usage: rrdgraph [start|stop|status|restart|save]" ;; esac WebSVN - hotsanic - Diff - Rev 25 and 24 - /trunk/rrdgraphram
  jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [rrdgraphram] - Diff between revs 24 and 25

Show entire file Ignore whitespace

Rev 24 Rev 25

Powered by WebSVN 2.2.1