Archived
1
0

Add status command

This commit is contained in:
MatMoul 2025-08-24 05:05:02 +02:00
parent 412744520e
commit 98542abb36

View File

@ -39,12 +39,15 @@ esac
function showProxyStatus() {
echo -e "Port\tProxy"
echo ""
for FILE in /tmp/ssh-proxy-"${USER}"/*; do
PORT=$(basename "${FILE}")
PROXY=$(grep 'PROXY=' "${FILE}" | sed 's/PROXY=//')
echo -e "${PORT}\t${PROXY}"
done
if [ -d /tmp/ssh-proxy-"${USER}" ]; then
if [ "$(find /tmp/ssh-proxy-"${USER}" -maxdepth 0 -empty -exec echo 1 \;)" == "" ]; then
for FILE in /tmp/ssh-proxy-"${USER}"/*; do
PORT=$(basename "${FILE}")
PROXY=$(grep 'PROXY=' "${FILE}" | sed 's/PROXY=//')
echo -e "${PORT}\t${PROXY}"
done
fi
fi
}
function startProxy() {