display configuration and log of FreeRadius servers
authorAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 2 Sep 2010 11:15:49 +0000 (13:15 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 2 Sep 2010 20:19:37 +0000 (22:19 +0200)
testing/do-tests.in
testing/scripts/load-testconfig

index 2a86951..5419916 100755 (executable)
@@ -521,6 +521,48 @@ do
 
        done
 
+       for host in $RADIUSHOSTS
+       do
+           eval HOSTLOGIN=root@\$ipv4_${host}
+
+           for file in clients.conf eap.conf radiusd.conf proxy.conf users
+           do
+               scp $HOSTLOGIN:/etc/raddb/$file \
+                   $TESTRESULTDIR/${host}.$file  > /dev/null 2>&1
+           done
+
+           scp $HOSTLOGIN:/var/log/radius/radius.log \
+               $TESTRESULTDIR/${host}.radius.log  > /dev/null 2>&1
+
+           chmod a+r $TESTRESULTDIR/*
+           cat >> $TESTRESULTDIR/index.html <<@EOF
+    <h3>$host</h3>
+      <table border="0" cellspacing="0" width="600">
+      <tr>
+       <td valign="top">
+         <ul>
+           <li><a href="$host.clients.conf">clients.conf</a></li>
+           <li><a href="$host.radiusd.conf">radiusd.conf</a></li>
+         </ul>
+       </td>
+       <td valign="top">
+         <ul>
+           <li><a href="$host.eap.conf">eap.conf</a></li>
+           <li><a href="$host.radius.log">radius.log</a></li>
+         </ul>
+      </td>
+       <td valign="top">
+         <ul>
+           <li><a href="$host.proxy.conf">proxy.conf</a></li>
+           <li><a href="$host.users">users</a></li>
+         </ul>
+      </td>
+    </tr>
+    </table>
+@EOF
+
+       done
+
        cat >> $TESTRESULTDIR/index.html <<@EOF
   </td></tr>
   <tr><td align="right">
index 8dd3069..3880e30 100755 (executable)
@@ -60,3 +60,15 @@ do
     ssh $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \
                    kill -SIGHUP `cat /var/run/syslogd.pid`' > /dev/null 2>&1
 done
+
+
+##########################################################################
+# clear radius.log on FreeRadius servers
+#
+
+for host in $RADIUSHOSTS
+do
+    eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
+    ssh $HOSTLOGIN 'rm -f /var/log/radius/radius.log; \
+                   kill -SIGHUP `cat /var/run/syslogd.pid`' > /dev/null 2>&1
+done