Untitled
unknown
plain_text
2 years ago
323 B
9
Indexable
# Get ports of xvnc
ports=($(ss -lptn | grep Xvnc | awk '{split($4, a, ":"); print a[2]}'))
if [[ ${#ports[@]} =~ "$2" ]]; then
read -p "Port $2 is in use. Do you want to connect to existing session? (Y/n)" answer
if [[ $answer == "yes" ]]; then
echo "IMPLEMENT CREATING XVNC"
else
echo ":o"
fi
else
echo ":oo"
fiEditor is loading...
Leave a Comment