Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
S1OVS
openvpn-server
Commits
43d97337
Commit
43d97337
authored
Jan 13, 2016
by
Matthew Smith
Browse files
Bug: Change hardcoded path to existing var for status log
parent
903788c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/status
View file @
43d97337
...
...
@@ -148,11 +148,11 @@ function create_Html_Status() {
function
echo_status
()
{
grep
CLIENT_LIST
/var/lib/openvpn-server/openvpn/status-sol1-server.
log |
head
-n1
|
sed
-e
"s/HEADER,//g"
|
awk
-F
","
'{printf "%-20s %-18s %-18s %-25s %14s %12s Routes\n",$2,$3,$4,$7,$5,$6}'
grep
CLIENT_LIST
"
$status_
log
"
|
head
-n1
|
sed
-e
"s/HEADER,//g"
|
awk
-F
","
'{printf "%-20s %-18s %-18s %-25s %14s %12s Routes\n",$2,$3,$4,$7,$5,$6}'
for
client
in
$(
grep
^CLIENT_LIST
/var/lib/openvpn-server/openvpn/status-sol1-server.
log |
awk
-F
","
'{print $2}'
)
;
do
row
=
$(
grep
^CLIENT_LIST
/var/lib/openvpn-server/openvpn/status-sol1-server.
log |
sed
-e
's/:[0-9]\{3,5\}//g'
|
grep
"
$client
"
)
routes
=
$(
grep
^ROUTING_TABLE
/var/lib/openvpn-server/openvpn/status-sol1-server.
log |
grep
"
$client
"
|
awk
-F
","
'{printf "%s|",$2}'
)
for
client
in
$(
grep
^CLIENT_LIST
"
$status_
log
"
|
awk
-F
","
'{print $2}'
)
;
do
row
=
$(
grep
^CLIENT_LIST
"
$status_
log
"
|
sed
-e
's/:[0-9]\{3,5\}//g'
|
grep
"
$client
"
)
routes
=
$(
grep
^ROUTING_TABLE
"
$status_
log
"
|
grep
"
$client
"
|
awk
-F
","
'{printf "%s|",$2}'
)
echo
"
$row
,
${
routes
::-1
}
"
|
awk
-F
","
'{printf "%-20s %-18s %-18s %-25s %11.0f MB %9.0f MB %2s\n",$2,$3,$4,$7,$5/1024/1024,$6/1024/1024,$10}'
done
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment