Skip to content

Commit

Permalink
Create discover_vpn_ipp.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Grifagor committed Jun 23, 2016
1 parent 2020df4 commit 4c57ac2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions discover_vpn_ipp.sh
@@ -0,0 +1,18 @@
#!/bin/bash

path=/etc/openvpn/ipp.txt # path to ifconfig-pool-persist file

echo "{"
echo "\"data\":["
comma=""

while read line ; do
IFS=","
set -- $line
user=$1
echo " $comma{\"{#VPNUSER}\":\"$user\"}"
comma=","
done < $path

echo "]"
echo "}"

0 comments on commit 4c57ac2

Please sign in to comment.