Get iptables output, formatting

This commit is contained in:
Kaladin Light 2016-12-10 23:17:47 -05:00
parent eaf78ab6bb
commit 601ce87df0

View file

@ -1,17 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# This scripts runs as root # This scripts runs as root
echo ":: PiVPN Debug ::" printf ":::\t\t\t\t\t:::\n::\t\tPiVPN Debug\t\t ::\n"
echo ":: Latest commit ::" printf ":::\t\t\t\t\t:::\n::\tLatest Commit\t\t\t ::\n:::\t\t\t\t\t:::\n"
git --git-dir /etc/.pivpn/.git log -n 1 git --git-dir /etc/.pivpn/.git log -n 1
echo ":: Recursive list of files in /etc/openvpn/easy-rsa/pki ::" printf ":::\t\t\t\t\t:::\n::\tRecursive list of files in\t ::\n"
printf "::\t/etc/openvpn/easy-rsa/pki\t ::\n:::\t\t\t\t\t:::\n"
ls -LR /etc/openvpn/easy-rsa/pki/ -Ireqs -Icerts_by_serial ls -LR /etc/openvpn/easy-rsa/pki/ -Ireqs -Icerts_by_serial
echo ":: /etc/pivpn/* ::" printf ":::\t\t\t\t\t:::\n::\tOutput of /etc/pivpn/*\t\t ::\n:::\t\t\t\t\t:::\n"
for filename in /etc/pivpn/*; do for filename in /etc/pivpn/*; do
echo ":: START $filename ::" echo ":: START $filename ::"
cat "$filename" cat "$filename"
echo ":: END $filename ::" echo ":: END $filename ::"
done done
echo ":: /etc/openvpn/easy-rsa/pki/Default.txt ::" printf ":::\t\t\t\t\t:::\n:: /etc/openvpn/easy-rsa/pki/Default.txt ::\n:::\t\t\t\t\t:::\n"
cat /etc/openvpn/easy-rsa/pki/Default.txt cat /etc/openvpn/easy-rsa/pki/Default.txt
echo ":: done ::" printf ":::\t\t\t\t\t:::\n::\tOutput of iptables\t\t ::\n:::\t\t\t\t\t:::\n"
iptables -t nat -L -n -v
printf ":::\t\t\t\t\t:::\n::\tDebug Output Complete\t\t ::\n:::\t\t\t\t\t:::\n"