Skip to content

Commit

Permalink
Update settings.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Oct 19, 2019
1 parent 656ba99 commit 45cad11
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions menu/interface/settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ touch /var/plexguide/pgui.switch
dstatus=$(docker ps --format '{{.Names}}' | grep "pgui")
if [ "pgui" != "$dstatus" ]; then
echo "Off" >/var/plexguide/pgui.switch
elif [ "pgui" == "$dstatus" ]; then
echo "On" >/var/plexguide/pgui.switch
else echo ""
fi

# Declare Ports State
touch /var/plexguide/ui.ports
touch /var/plexguide/http.ports
ports=$(cat /var/plexguide/ui.ports)
if [ "OPEN" == "$ports" ]; then
ports2=$(cat /var/plexguide/server.ports)
if [[ "OPEN" == "$ports" || "" == "$ports2" ]]; then
echo "8555" >/var/plexguide/http.ports
elif [ "CLOSED" == "$ports" ]; then
elif [[ "CLOSED" == "$ports" || "*127.0.0.1*" == "$ports2" ]]; then
echo "CLOSED" >/var/plexguide/http.ports
else echo ""
fi
Expand Down

0 comments on commit 45cad11

Please sign in to comment.