mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
19 lines
358 B
Bash
Executable File
19 lines
358 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Author: sud0nick
|
|
# Date: April 6, 2016
|
|
|
|
IN_SERVER_BLOCK=false;
|
|
|
|
while read p; do
|
|
if [[ $IN_SERVER_BLOCK == false ]]; then
|
|
if [[ $p == *"listen"* && $p == *"1471"* ]]; then
|
|
IN_SERVER_BLOCK=true;
|
|
fi
|
|
else
|
|
if [[ $p == *".cer;" || $p == *".key;" ]]; then
|
|
echo $p | cut -d '/' -f 5 | tr -d ';';
|
|
fi
|
|
fi
|
|
done < /etc/nginx/nginx.conf
|