mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Add open port detection
This commit is contained in:
parent
874853fe18
commit
014bdf911a
1 changed files with 21 additions and 0 deletions
|
@ -81,6 +81,15 @@ function versionCheck {
|
|||
else
|
||||
echo "lighttpd not installed." >> ${DEBUG_LOG}
|
||||
fi
|
||||
|
||||
echo "::: Writing PHP version to logfile."
|
||||
php_ver=$(php -v | head -n1)
|
||||
if [ -n php_ver ]
|
||||
then
|
||||
echo "${php_ver}" >> ${DEBUG_LOG}
|
||||
else
|
||||
echo "PHP not installed." >> ${DEBUG_LOG}
|
||||
fi
|
||||
echo >> ${DEBUG_LOG}
|
||||
}
|
||||
|
||||
|
@ -151,6 +160,17 @@ function hostnameCheck {
|
|||
fi
|
||||
}
|
||||
|
||||
function portCheck {
|
||||
echo "############################################################" >> ${DEBUG_LOG}
|
||||
echo "######## Open Port Information #########" >> ${DEBUG_LOG}
|
||||
echo "############################################################" >> ${DEBUG_LOG}
|
||||
|
||||
echo "::: Writing local server ports to logfile"
|
||||
|
||||
${SUDO} netstat -tulpn >> ${DEBUG_LOG}
|
||||
echo >> ${DEBUG_LOG}
|
||||
}
|
||||
|
||||
function compareWhitelist {
|
||||
if [ ! -f "$WHITELISTMATCHES" ]; then
|
||||
${SUDO} touch ${WHITELISTMATCHES}
|
||||
|
@ -269,6 +289,7 @@ versionCheck
|
|||
distroCheck
|
||||
ipCheck
|
||||
hostnameCheck
|
||||
portCheck
|
||||
compareWhitelist
|
||||
compareBlacklist
|
||||
testNslookup
|
||||
|
|
Loading…
Reference in a new issue