pari: trunk r502 - /trunk/gui_configs/gui_sysinfo

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Mar 27 14:51:22 MST 2007


Author: pari
Date: Tue Mar 27 16:51:21 2007
New Revision: 502

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=502
Log:
cleanup gui_sysinfo

Modified:
    trunk/gui_configs/gui_sysinfo

Modified: trunk/gui_configs/gui_sysinfo
URL: http://svn.digium.com/view/asterisk-gui/trunk/gui_configs/gui_sysinfo?view=diff&rev=502&r1=501&r2=502
==============================================================================
--- trunk/gui_configs/gui_sysinfo (original)
+++ trunk/gui_configs/gui_sysinfo Tue Mar 27 16:51:21 2007
@@ -1,65 +1,67 @@
 #!/bin/sh
+SYSINFO_OUTPUT="/var/lib/asterisk/static-http/config/sysinfo_output.html"
+
 UNAME="`uname -a`"
-/bin/echo "<div id=si_uname>$UNAME</div>" > /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=si_uname>$UNAME</div>" > $SYSINFO_OUTPUT
                 
 UPTIME="`uptime`"
-/bin/echo "<div id=si_uptime>$UPTIME</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=si_uptime>$UPTIME</div>" >> $SYSINFO_OUTPUT 
                   
 ASTERISK="`/usr/sbin/asterisk -V`"
-/bin/echo "<div id=si_astver>$ASTERISK</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=si_astver>$ASTERISK</div>" >> $SYSINFO_OUTPUT 
                 
 TODAY="`date`"
-/bin/echo "<div id=si_date>$TODAY</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=si_date>$TODAY</div>" >> $SYSINFO_OUTPUT 
 
 HOSTNAME="`hostname -f`"
-/bin/echo "<div id=si_hostname>$HOSTNAME</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=si_hostname>$HOSTNAME</div>" >> $SYSINFO_OUTPUT 
      
 IFCONFIG=`ifconfig`
-/bin/echo "<div id=si_ifconfig><pre>$IFCONFIG</pre></div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=si_ifconfig><pre>$IFCONFIG</pre></div>" >> $SYSINFO_OUTPUT 
                          
 DISKUSAGE=`df -h`
-/bin/echo "<div id=si_du><pre>$DISKUSAGE</pre></div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=si_du><pre>$DISKUSAGE</pre></div>" >> $SYSINFO_OUTPUT 
                         
 MEMORYUSAGE=`free`
-/bin/echo "<div id=si_free><pre>$MEMORYUSAGE</pre></div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=si_free><pre>$MEMORYUSAGE</pre></div>" >> $SYSINFO_OUTPUT 
 
 
 THISMONTH=`/bin/date +%b`
 THISDAY=`/bin/date +%d`
 THIS_DAY=`/bin/date +%_d`
-/bin/grep /var/log/asterisk/messages -e "$THISMONTH\( $THISDAY\| $THIS_DAY\)" > /var/lib/asterisk/static-http/config/bkps/today_log.html
+/bin/grep /var/log/asterisk/messages -e "$THISMONTH\( $THISDAY\| $THIS_DAY\)" > /var/lib/asterisk/static-http/config/today_log.html
 
 
-/bin/echo "<div id=bkp_files>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=bkp_files>" >> $SYSINFO_OUTPUT 
 /bin/mkdir -p /var/lib/asterisk/gui_configbackups
 BKPFILES=`ls /var/lib/asterisk/gui_configbackups/`
 for i in $BKPFILES
 do
-/bin/echo "$i<BR>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "$i<BR>" >> $SYSINFO_OUTPUT 
 done
-/bin/echo "</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "</div>" >> $SYSINFO_OUTPUT 
 
 
 
-/bin/echo "<div id=rec_files>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=rec_files>" >> $SYSINFO_OUTPUT 
 /bin/mkdir -p /var/lib/asterisk/sounds/record
 RECFILES=`ls /var/lib/asterisk/sounds/record/`
 for i in $RECFILES
 do
-/bin/echo "$i<BR>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "$i<BR>" >> $SYSINFO_OUTPUT 
 done
-/bin/echo "</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "</div>" >> $SYSINFO_OUTPUT 
 
 
 
-/bin/echo "<div id=sound_files>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "<div id=sound_files>" >> $SYSINFO_OUTPUT 
 /bin/mkdir -p /var/lib/asterisk/sounds
 SNDFILES=`ls /var/lib/asterisk/sounds/`
 for i in $SNDFILES
 do
-/bin/echo "$i<BR>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "$i<BR>" >> $SYSINFO_OUTPUT 
 done
-/bin/echo "</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo_output.html
+/bin/echo "</div>" >> $SYSINFO_OUTPUT 
 
 
 



More information about the asterisk-gui-commits mailing list