Commit b5c6517d authored by Matthew Smith's avatar Matthew Smith
Browse files

Fixed html layout

parent 1112fcdd
......@@ -85,11 +85,14 @@ function Create_Html_Status() {
fi
server_conf=""
#TODO: Can we do some fancy read each conf an list keys for that conf. maybe not.
server_conf="$OVPN_ORGNICK-server.conf"
table_body=$(Open_Table_Section)
#TODO: Can we get this from the server conf?
openvpn_index="/var/lib/openvpn-server/openssl/index.txt"
for vpn_name in `grep ^V $openvpn_index | grep emailAddress | sed -e "s/\/emailAddress//g" | awk -F"=" {'print $5'}`; do
for vpn_name in `grep ^V $openvpn_index | grep CN | grep -v "OpenVPN server on" | sed -e "s/\/emailAddress//g" | awk -F"=" {'print $5'}`; do
## Details of current status
#tail /var/lib/openvpn-server/openvpn/status.log | grep ltu-kit01 | tail -n1 | awk -F"," {'print $2 " " $1 " " $3 " " $4'} | sed -e 's/:[0-9]\{3,5\}//g'
......@@ -113,15 +116,15 @@ function Create_Html_Status() {
if [ "$connection_type" == "connect" ]; then
row_class="$connection_type connected"
vpn_ip=$this_ip
connenected_since=$(echo $connected_user | cut -f7 -d",")
connected_since=$(echo $connected_user | cut -f7 -d",")
else
row_class="$connection_type"
fi
elif grep -q $vpn_name "$status_log" ; then # non triggering connected user
row_class="connected"
vpn_ip=$(echo $connected_user | cut -f2 -d",")
connenected_since=$(echo $connected_user | cut -f7 -d",")
vpn_ip=$(echo $connected_user | cut -f4 -d",")
connected_since=$(echo $connected_user | cut -f7 -d",")
else # not connected
echo -n ""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment