Add status command
This commit is contained in:
parent
412744520e
commit
98542abb36
@ -39,12 +39,15 @@ esac
|
|||||||
|
|
||||||
function showProxyStatus() {
|
function showProxyStatus() {
|
||||||
echo -e "Port\tProxy"
|
echo -e "Port\tProxy"
|
||||||
echo ""
|
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
|
for FILE in /tmp/ssh-proxy-"${USER}"/*; do
|
||||||
PORT=$(basename "${FILE}")
|
PORT=$(basename "${FILE}")
|
||||||
PROXY=$(grep 'PROXY=' "${FILE}" | sed 's/PROXY=//')
|
PROXY=$(grep 'PROXY=' "${FILE}" | sed 's/PROXY=//')
|
||||||
echo -e "${PORT}\t${PROXY}"
|
echo -e "${PORT}\t${PROXY}"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function startProxy() {
|
function startProxy() {
|
||||||
|
Reference in New Issue
Block a user