Skip to content

Commit

Permalink
Revert "remove plex useless local edition"
Browse files Browse the repository at this point in the history
This reverts commit 27f7dae.
  • Loading branch information
Admin9705 committed Feb 26, 2019
1 parent 6ec1ea9 commit 146f501
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
3 changes: 3 additions & 0 deletions menu/pgbox/pgbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ EOF

sleep 2.5

if [ "$p" == "plex" ]; then bash /opt/plexguide/menu/plex/plex.sh;
elif [ "$p" == "nzbthrottle" ]; then nzbt; fi

# Store Used Program
echo $p > /tmp/program_var
# Execute Main Program
Expand Down
3 changes: 3 additions & 0 deletions menu/pgbox/pgboxcommunity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ EOF

sleep 2.5

if [ "$p" == "plex" ]; then bash /opt/plexguide/menu/plex/plex.sh;
elif [ "$p" == "nzbthrottle" ]; then nzbt; fi

# Store Used Program
echo $p > /tmp/program_var
# Execute Main Program
Expand Down
3 changes: 3 additions & 0 deletions menu/pgbox/pgboxcore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ EOF

sleep 2.5

if [ "$p" == "plex" ]; then bash /opt/plexguide/menu/plex/plex.sh;
elif [ "$p" == "nzbthrottle" ]; then nzbt; fi

# Store Used Program
echo $p > /tmp/program_var
# Execute Main Program
Expand Down
87 changes: 87 additions & 0 deletions menu/plex/plex.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Author(s): Admin9705 - Deiteq
# URL: https://plexguide.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################

# FUNCTIONS START ##############################################################

# BAD INPUT
badinput () {
echo
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed < /dev/tty

}

badinput2 () {
echo
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed < /dev/tty
question2
}
# FIRST QUESTION

question1 () {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 Plex - Version of Plex To Install?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1 - Plex Public
2 - Plex Pass
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF

read -p 'Type a Number | Press [ENTER]: ' typed < /dev/tty
if [ "$typed" == "1" ]; then echo public > /var/plexguide/plex.extension && question2;
elif [ "$typed" == "2" ]; then echo plexpass > /var/plexguide/plex.extension && question2;
else badinput; fi
}

# SECOND QUESTION
question2 () {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 PG - PlexGuide Installer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Reference: http://plex.pgblitz.com
1 - Plex Server > Remote (Outside Network)
2 - Plex Server > Local (Within Network)
Z - EXIT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF

read -p 'Type a Number | Press [ENTER]: ' typed < /dev/tty
echo ""
if [ "$typed" == "1" ]; then echo remote > /var/plexguide/plex.server && question3;
elif [ "$typed" == "2" ]; then echo local > /var/plexguide/plex.server;
elif [[ "$typed" == "z" || "$typed" == "Z" ]]; then exit;
else badinput2; fi
}

# THIRD QUESTION
question3 () {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 Remote Plex Server - Claim the Plex Server
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
To Claim the Plex Server, visit https://www.plex.tv/claim/ and input the
code below! You have 5 minutes to do so!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF

read -p 'Plex Server Claim Number | Press [ENTER]: ' typed < /dev/tty
echo $typed > /var/plexguide/plex.claim && break=on;
}

# FUNCTIONS END ##############################################################

question1
#ansible-playbook /opt/coreapps/apps/plex.yml

0 comments on commit 146f501

Please sign in to comment.