Skip to content

Commit

Permalink
plex_autoscan update
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Oct 26, 2019
1 parent 4d87cd6 commit ab41505
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
32 changes: 18 additions & 14 deletions menu/pgscan/pgscan.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################

# KEY VARIABLE RECALL & EXECUTION
mkdir -p /var/plexguide/pgscan
mkdir -p /opt/appdata/pgscan
Expand All @@ -20,10 +12,22 @@ variable() {

deploycheck() {
dcheck=$(systemctl is-active plex_autoscan.service)
if [ "$dcheck" == "active" ]; then
if [ "$user" == "" ]; then
dstatus="✅ DEPLOYED"
else dstatus="⚠️ NOT DEPLOYED"; fi
}
userstatus() {
userdep=$(cat /var/plexguide/plex.pw)
if [ "$userdep" != "active" ]; then
dstatus="✅ DEPLOYED"
else dstatus="⚠️ NOT DEPLOYED"; fi
}
tokenstatus() {
ptokendep=$(cat /opt/appdata/pgscan/plex.token)
if [ "$ptokendep" != "" ]; then
dstatus="✅ DEPLOYED"
else dstatus="⚠️ NOT DEPLOYED"; fi
}

plexcheck() {
pcheck=$(docker ps | grep "\<plex\>")
Expand Down Expand Up @@ -88,11 +92,11 @@ question1() {
🚀 Scan Interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Deploy Plex Username & Plex Passwort
[2] Deploy Plex Token
[1] Deploy Plex Username & Plex Passwort [ $userdep ]
[2] Deploy Plex Token [ $ptokendep ]
[A] Deploy Scan [$dstatus]
[A] Deploy Scan [ $dstatus ]
[D] PlexAutoScan Domain
[Z] - Exit
Expand All @@ -108,10 +112,10 @@ EOF
elif [ "$typed" == "2" ]; then
bash /opt/plexguide/menu/pgscan/scripts/plex_token.sh
question1
elif [ "$typed" == "A" ]; then
elif [ "$typed" == "A" || "$typed" == "a" || ]; then
ansible-playbook /opt/plexguide/menu/pg.yml --tags plex_autoscan
question1
elif [ "$typed" == "D" ]; then
elif [ "$typed" == "D" || "$typed" == "d" ]; then
showupdomain
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit
Expand Down
4 changes: 2 additions & 2 deletions menu/pgscan/scripts/plex_pw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ question2() {
📂 User Name & Password Confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
User Name: $user
User Name: [ $user ]
User Pass: $pw
User Pass: [ $pw ]
⚠️ Information Correct?
Expand Down
2 changes: 1 addition & 1 deletion menu/start/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ EOF
[3] Port Guard : [$ports] Protects the Server Ports
[4] rClone : Mount Transport
[5] APPBox : Apps ~ Core, Community & Removal
[6] PTS-PAS : PlexAutoScan [ ALPHA VERSION ]
[6] CBOX-PAS : PlexAutoScan [ ALPHA VERSION ]
[7] WordPress : Deploy WordPress Instances
[8] PTS Vault : Backup & Restore
Expand Down

0 comments on commit ab41505

Please sign in to comment.