Revert "Merge pull request #31 from Pandaura/dev"

This reverts commit 619678b60b, reversing
changes made to 9ec20a91e5.
This commit is contained in:
thesammykins
2021-11-03 08:42:27 +11:00
parent 619678b60b
commit b85d46105c
95 changed files with 5730 additions and 6574 deletions

1
.gitignore vendored
View File

@@ -3,4 +3,3 @@ menu/start.sh
menu/hcloud/LICENSE menu/hcloud/LICENSE
menu/gce/functions/oldfile.sh menu/gce/functions/oldfile.sh
.vscode/sftp.json

File diff suppressed because it is too large Load Diff

106
README.md
View File

@@ -1,28 +1,12 @@
![](https://github.com/Pandaura/PTS-Team/blob/master/pandaura.gif) **PTS is currently in maintenance mode and is considered feature complete.** From time-to-time developers will take it upon themselves to add new containers to Community-Apps as requested and update the Core-Apps whenever required.
THIS KINDA EXPLODED SOMEWHAT SO EXPECT TO SEE SOME CHANGES SOON! BARE WITH ME! We consider PTS to be a remarkable collaborative achievement and take pride in the fact we have built a solid foundation for any person to setup and learn basic Linux and also run a media server with minimal effort.
This is a fork of PTS/MHA called Pandaura. Thank you to all who contributed to the previous projects. No features are really added to MHA anymore as it is in maintenance mode so I will be making some ammendments here. Pandaura utilizes Ansible and Docker to streamline your media server while deploying multiple tools for your server operations. We encourage anyone wanting to contribute to the project in the future to join our community, this is also where we provide support: https://discord.gg/cKsMwMZ
My personal opinion. PTS/MHA did well and still are providing excellend support. Whilst PG was more of a rename and grab project with an awesome community in which we can't deny the time and effort that was put into the project. The remnants meant things were, for lack of a better word, bashed together which left untidy and unfinished menu systems with grammar and spelling that will make your eyes bleed. I'm here to tidy this up, improve on the messy (only in some places) code and just make this the tool that it should have been. Previous projects had the potential to just be burned but you have nothing to worry about here. This is a safer/faster/more reliable project but we all have different tastes....enjoy. Thanks to our valued contributors over the past couple of years, you have helped create something to be proud of and that will serve the community well into the future.
I'll be listing a few of the annoyances below... **You know who you are.** PTS is forever, others will come and go.
The menu doesn't even go back when you're in a sub menu half the time...you are either left hanging or you go straight back to the beginning either way this is really frustrating
Most menu sub systems again wouldn't even 'clear' leaving your terminal messy
Current section being worked on -
Traefik V2
Authelia
Cloud Companion
Python Plex Library - own version with scraping
Spelling/typos/general script tidy up
Refresh
Ouroboros -- It's no longer in development so why use it https://github.com/pyouroboros/ouroboros
Core Apps - Update the list of Core apps
Community Apps - Update the list of Community apps
_**Table of Contents**_ _**Table of Contents**_
@@ -36,9 +20,9 @@ _**Table of Contents**_
# 1. Install # 1. Install
## (i) Backup your current server using PTS Vault before installing Pandaura. ## (i) Backup your current server using PTS Vault before installing PTS-Team.
Your PTS backup can be used to restore your applications in Pandaura fork after install (see later) Your PTS backup can be used to restore your applications in PTS fork after install (see later)
**NOTE** Tested and working for PG v8.5-8.7 **NOTE** Tested and working for PG v8.5-8.7
Type the following to access your current build's menu: `sudo pgblitz` Type the following to access your current build's menu: `sudo pgblitz`
@@ -59,65 +43,95 @@ sudo wget -N https://raw.githubusercontent.com/MHA-Team/PTS-Clone/final/function
``` ```
## (ii) Installing Pandaura ## (ii) Installing PTS
**NOTE** **NOTE**
The ideal method of installing the Pandaura is to delete your current build and install Pandaura on a clean system. The ideal method of installing the PTS fork is to delete your current build and install PTS fork on a clean system.
Pandaura works best on **ubuntu 18.XX** and this tutorial will assume you are using ubuntu 18.XX. PTS fork works best on **ubuntu 18.XX** and this tutorial will assume you are using ubuntu 18.XX.
If you are unsure on how to do this, please refer to the documentation provided by your server provider. If you are unsure on how to do this, please refer to the documentation provided by your server provider.
Once your server has an OS installed, login to your server using SSH. Once your server has an OS installed, login to your server using SSH.
Type or paste the following to install Pandaura fork: Type or paste the following to install PTS fork:
``` ```
sudo apt-get update -yqq sudo apt-get update -yqq
sudo apt-get upgrade -yqq sudo apt-get upgrade -yqq
sudo apt-get autoclean -yqq sudo apt-get autoclean -yqq
sudo apt-get install wget -y sudo apt-get install wget -y
sudo wget -qO- https://raw.githubusercontent.com/Pandaura/Install/master/install.sh | sudo bash sudo wget -qO- https://raw.githubusercontent.com/MHA-Team/Install/master/install.sh | sudo bash
``` ```
The installation will then take you through the setup which is self-explanatory. The installation will then take you through the setup which is self-explanatory.
### Optional - updating your PTS to Pandaura ### Alternative method of installing PTS fork (without removing your current build)
IDoMnCi came up with a great script to change all the links on an existing PTS-Team (NOT PG 8.x) to the Pandaura.
Details - https://github.com/Pandaura/Install/pull/4 **NOTE** This has currently only been tested with PG v8.5-8.7
Type or paste the following:
``` ```
sudo wget -qO- https://raw.githubusercontent.com/Pandaura/Install/master/relocate.sh | sudo bash sudo apt-get update -yqq
sudo apt-get upgrade -yqq
sudo apt-get autoclean -yqq
sudo apt-get install wget -y
sudo wget -qO- https://raw.githubusercontent.com/MHA-Team/Install/master/install.sh | sudo bash
```
### Optional - updating your PTS-Team fork to the new MHA-Team fork
IDoMnCi came up with a great script to change all the links on an existing PTS-Team fork (NOT PG 8.x) to the MHA-Team fork.
Details - https://github.com/MHA-Team/Install/pull/4
```
sudo wget -qO- https://raw.githubusercontent.com/MHA-Team/Install/master/relocate.sh | sudo bash
sudo ptsupdate sudo ptsupdate
``` ```
## Configuring Pandaura ### Testing Only - Not Supported - Install PTS-Team fork via Windows 10 20H1 WSL2 Ubuntu 18.04
Then type the following to run the Pandaura menu: `sudo pandaura` Sammykins has tested installing the PTS-Team form on a Windows 10 machine via the new WSL2 system built into Windows.
Follow the above (#ii-installing-pts) in a WSL2 terminal shell, if you do not know how to enable WSL2 and install an Ubuntu 18.04 system for this method it is recommended not to install.
* Set up and deploy Traefik ([see here](https://github.com/Pandaura/PTS-Team/wiki/Traefik)) DO NOT ASK FOR SUPPORT OR FIXES FOR THIS METHOD IT IS PROVIDED AS-IS AND WE TAKE NO RESPONSIBILITY IF ANYTHING BELOW DOES NOT FUNCTION OR BREAKS YOUR WINDOWS 10 INSTALLATION. YOU DO THE BELOW AT YOUR OWN RISK.
* Close ports using Port Guard ([see here](https://github.com/Pandaura/PTS-Team/wiki/PTS-Port-Guard)) * Follow the following page to install and setup WSL2 ([see here](https://docs.microsoft.com/en-us/windows/wsl/install-win10))
* Only use an Ubuntu 18.04 VM from the Microsoft Store
* Prior to install follow this to enable systemd: ([see here](https://github.com/DamionGans/ubuntu-wsl2-systemd-script))
* The script may fail to create the plexguide network in docker, simply run `docker network create plexguide` to fix
* Use MultiHD to set another drive as the main path for data, we recommend this if your C drive is too small as WSL2 will default run on the OS drive, e.g. if you have a D: drive, this would be `/mnt/d/pathtoanewfolderforptsfiles`
* Follow the rest of the guides for configuring PTS
* Deploy Pandaura Shield (GOAuth - all apps supported) [see here](https://github.com/Pandaura/PTS-Team/wiki/PTS-Shield) ## Configuring PTS
* Set up and deploy Clone. You can restore you backup keys at this stage. [see here](https://github.com/Pandaura/PTS-Team/wiki/PTS-Clone) Configuring PTS fork is the same as configuring PG / PlexGuide.
* (Optional) Restore PTS backup (created in step 1) using Vault. [see here](https://github.com/Pandaura/PTS-Team/wiki/PTS-Vault---Data-Storage) Then type the following to run the PTS menu: `sudo pts`
* Install desired core/community applications (Do this regardless of whether it is a fresh install with restore or overwrite) [see here](https://github.com/Pandaura/PTS-Team/wiki/core-apps) * Set up and deploy Traefik ([see here](https://github.com/MHA-Team/PTS-Team/wiki/Traefik))
* (Optional) If overwriting/restoring, you will need to change 2 remote path mappings in applications (NZB clients / Torrent clients / radarr / sonarr / lidarr etc) [see here](https://github.com/Pandaura/PTS-Team/wiki/Remote-Path-Mappings) * Close ports using Port Guard ([see here](https://github.com/MHA-Team/PTS-Team/wiki/PTS-Port-Guard))
* Deploy PTS Shield (GOAuth - all apps supported) [see here](https://github.com/MHA-Team/PTS-Team/wiki/PTS-Shield)
* Set up and deploy PTS-Clone. You can restore you backup keys at this stage. [see here](https://github.com/MHA-Team/PTS-Team/wiki/PTS-Clone)
* (Optional) Restore PTS backup (created in step 1) using PTS-Vault. [see here](https://github.com/MHA-Team/PTS-Team/wiki/PTS-Vault---Data-Storage)
* Install desired core/community applications (Do this regardless of whether it is a fresh install with restore or overwrite) [see here](https://github.com/MHA-Team/PTS-Team/wiki/core-apps)
* (Optional) If overwriting/restoring, you will need to change 2 remote path mappings in applications (NZB clients / Torrent clients / radarr / sonarr / lidarr etc) [see here](https://github.com/MHA-Team/PTS-Team/wiki/Remote-Path-Mappings)
**Why do I need to change remote paths?** **Why do I need to change remote paths?**
Pandaura will create one download folder for completed downloads using any NZB client `/mnt/downloads/nzb` and one download folder for completed downloads using any torrent client `/mnt/downloads/torrent`. Both folder names are different to those used in previous versions of PTS. This remote paths need to be changed in your configuration settings (nzbget/radarr/sonarr etc) which you can do in either in terminal or webUI. PTS will create one download folder for completed downloads using any NZB client `/mnt/downloads/nzb` and one download folder for completed downloads using any torrent client `/mnt/downloads/torrent`. Both folder names are different to those used in previous versions of PTS. This remote paths need to be changed in your configuration settings (nzbget/radarr/sonarr etc) which you can do in either in terminal or webUI.
**NOTE** PTS does **not** install PGUI by default. **NOTE** PTS fork does **not** install PGUI by default.
# 2. Project Statement # 2. Project Statement
Pandaura is a **fork** of PTS/MHA, an all-in-one media solution that deploys a Media Server through the use of either your local HDD or Google Drive; serving as unlimited back-end storage. PTS is a **fork** of PG / Plexguide, an all-in-one media solution that deploys a Media Server through the use of either your local HDD or Google Drive; serving as unlimited back-end storage. PTS utilizes Ansible and Docker to streamline your Media Server while deploying multiple tools for your server operations.
# 3. Functional Use # 3. Functional Use
@@ -133,8 +147,8 @@ Pandaura is a **fork** of PTS/MHA, an all-in-one media solution that deploys a
# 4. Recommended Reading # 4. Recommended Reading
[**[Click Here]**](https://github.com/Pandaura/PTS-Team/wiki/Pre-Reading) to view the list! [**[Click Here]**](https://github.com/MHA-Team/PTS-Team/wiki/Pre-Reading) to view the list!
## 5. Having Issues? ## 5. Having Issues?
[**[Click Here]**](https://github.com/Pandaura/PTS-Team/wiki/Common-Issues) for more information! [**[Click Here]**](https://github.com/MHA-Team/PTS-Team/wiki/Common-Issues) for more information!

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# Title: PTS List commands # Title: PTS List commands
# Author(s): Pandaura # Author(s): MrDoobPG
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
--- ---
@@ -26,10 +26,26 @@
###### Install PGBlitz ###### Install PGBlitz
- name: Pandaura - name: PlexGuide
template: template:
src: pandaura src: plexguide
dest: /bin/pandaura dest: /bin/plexguide
force: yes
mode: 0775
owner: root
- name: PTS
template:
src: pts
dest: /bin/pts
force: yes
mode: 0775
owner: root
- name: PGBlitz
template:
src: pgblitz
dest: /bin/pgblitz
force: yes force: yes
mode: 0775 mode: 0775
owner: root owner: root

View File

@@ -6,8 +6,8 @@
################################################################################ ################################################################################
rm -rf /opt/ptsupdate 1>/dev/null 2>&1 rm -rf /opt/ptsupdate 1>/dev/null 2>&1
mkdir -p /opt/ptsupdate 1>/dev/null 2>&1 mkdir -p /opt/ptsupdate 1>/dev/null 2>&1
git clone --single-branch https://github.com/Pandaura/PTS-Update.git /opt/ptsupdate 1>/dev/null 2>&1 git clone --single-branch https://github.com/MHA-Team/PTS-Update.git /opt/ptsupdate 1>/dev/null 2>&1
chown -cR 1000:1000 /opt/ptsupdate 1>/dev/null 2>&1 chown -cR 1000:1000 /opt/ptsupdate 1>/dev/null 2>&1
chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1 chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1
source /opt/ptsupdate/autoupdate/update.sh source /opt/ptsupdate/autoupdate/update.sh

45
menu/alias/templates/pg Normal file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
file="/var/pgblitz/pg.number"
if [ -e "$file" ]; then
check="$(cat /var/pgblitz/pg.number | head -c 1)"
if [[ "$check" == "5" || "$check" == "6" || "$check" == "7" ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 INSTALLER BLOCK: Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
We detected PG Version $check is running! Per the instructions, PG 8
must be installed on a FRESH BOX! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
exit
fi
fi
source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/start.sh
source /opt/plexguide/menu/functions/install.sh
mkdir -p /opt/plexguide/roles/log
mkdir -p /var/plexguide/logs
mkdir -p /opt/appdata/plexguide
sudocheck
missingpull
if [[ ! -e "/bin/pgblitz" ]]; then
cp /opt/plexguide/menu/alias/templates/pgblitz /bin
fi
chown 1000:1000 /bin/pgblitz &>/dev/null &
chmod 0755 /bin/pgblitz &>/dev/null &
# pg deploy contains pgdeploy at end
pginstall

View File

@@ -0,0 +1,39 @@
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
file="/var/plexguide/pg.number"
if [ -e "$file" ]; then
check="$(cat /var/plexguide/pg.number | head -c 1)"
if [[ "$check" == "5" || "$check" == "6" || "$check" == "7" ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 INSTALLER BLOCK: Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
We detected PG Version $check is running! Per the instructions, PG 8
must be installed on a FRESH BOX! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
exit
fi
fi
source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/start.sh
source /opt/plexguide/menu/functions/install.sh
mkdir -p /opt/plexguide/roles/log
mkdir -p /var/plexguide/logs
mkdir -p /opt/appdata/plexguide
sudocheck
missingpull
# pg deploy contains pgdeploy at end
pginstall

View File

@@ -0,0 +1,44 @@
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
file="/var/plexguide/pg.number"
if [ -e "$file" ]; then
check="$(cat /var/plexguide/pg.number | head -c 1)"
if [[ "$check" == "5" || "$check" == "6" || "$check" == "7" ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 INSTALLER BLOCK: Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
We detected PG Version $check is running! Per the instructions, PG 8
must be installed on a FRESH BOX! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
exit
fi
fi
source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/start.sh
source /opt/plexguide/menu/functions/install.sh
mkdir -p /opt/plexguide/roles/log
mkdir -p /var/plexguide/logs
mkdir -p /opt/appdata/plexguide
sudocheck
missingpull
if [[ ! -e "/bin/pgblitz" ]]; then
cp /opt/plexguide/menu/alias/templates/pgblitz /bin/ &>/dev/null &
chown 1000:1000 /bin/pgblitz
chmod 0755 /bin/pgblitz
fi
# pg deploy contains pgdeploy at end
pginstall

View File

@@ -10,17 +10,9 @@ source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/start.sh source /opt/plexguide/menu/functions/start.sh
source /opt/plexguide/menu/functions/install.sh source /opt/plexguide/menu/functions/install.sh
mkdir -p /opt/plexguide/roles/log
mkdir -p /var/plexguide/logs
mkdir -p /opt/appdata/plexguide
sudocheck sudocheck
missingpull missingpull
if [[ ! -e "/bin/pandaura" ]]; then
cp /opt/plexguide/menu/alias/templates/pandaura /bin/ &>/dev/null &
chown 1000:1000 /bin/pandaura
chmod 0755 /bin/pandaura
fi
# pg deploy contains pgdeploy at end # pg deploy contains pgdeploy at end
pginstall clear
pginstall

View File

@@ -6,8 +6,8 @@
################################################################################ ################################################################################
rm -rf /opt/ptsupdate 1>/dev/null 2>&1 rm -rf /opt/ptsupdate 1>/dev/null 2>&1
mkdir -p /opt/ptsupdate 1>/dev/null 2>&1 mkdir -p /opt/ptsupdate 1>/dev/null 2>&1
git clone --single-branch https://github.com/Pandaura/PTS-Update.git /opt/ptsupdate 1>/dev/null 2>&1 git clone --single-branch https://github.com/MHA-Team/PTS-Update.git /opt/ptsupdate 1>/dev/null 2>&1
chown -cR 1000:1000 /opt/ptsupdate 1>/dev/null 2>&1 chown -cR 1000:1000 /opt/ptsupdate 1>/dev/null 2>&1
chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1 chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1
source /opt/ptsupdate/autoupdate/update.sh source /opt/ptsupdate/autoupdate/update.sh

View File

@@ -15,15 +15,14 @@ source /opt/plexguide/menu/functions/functions.sh
# FIRST QUESTION # FIRST QUESTION
question1() { question1() {
typed="${typed,,}" appguard=$(cat /var/plexguide/server.ht)
appguard=$(cat /var/plexguide/server.ht) if [ "$appguard" == "" ]; then
if [ "$appguard" == "" ]; then guard="DISABLED" && opp="Enable"
guard="DISABLED" && opp="Enable" else guard="ENABLED" && opp="Disable"; fi
else guard="ENABLED" && opp="Disable"; fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Welcome to AppGuard 🌎 Welcome to AppGuard!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Reference: http://appguard.pgblitz.com ⚡ Reference: http://appguard.pgblitz.com
@@ -34,26 +33,26 @@ Z. Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Type a Number | Press [ENTER]: ' typed </dev/tty read -p 'Type a Number | Press [ENTER]: ' typed </dev/tty
if [ "$typed" == "1" ]; then if [ "$typed" == "1" ]; then
if [ "$guard" == "DISABLED" ]; then if [ "$guard" == "DISABLED" ]; then
echo "" echo ""
read -p '↘️ [Type] a USERNAME | PRESS [ENTER] ' user </dev/tty read -p '↘️ [Type] a USERNAME! | PRESS [ENTER] ' user </dev/tty
read -p '↘️ [Type] a PASSWORD | PRESS [ENTER] ' pw </dev/tty read -p '↘️ [Type] a PASSWORD! | PRESS [ENTER] ' pw </dev/tty
htpasswd -cbs /var/plexguide/server.ht $user $pw htpasswd -cbs /var/plexguide/server.ht $user $pw
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ AppGuard - Hashed UserName & Password ✅️ AppGuard - Hashed UserName & Password
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 3 sleep 3
else echo "" >/var/plexguide/server.ht; fi else echo "" >/var/plexguide/server.ht; fi
bash /opt/plexguide/menu/appguard/rebuild.sh bash /opt/plexguide/menu/appguard/rebuild.sh
elif [[ "${typed,,}" == "z" ]]; then elif [[ "$typed" == "z" || "$typed" == "Z" ]]; then
exit exit
else badinput1; fi else badinput1; fi
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################

View File

@@ -5,9 +5,9 @@
command: ptsupdate command: ptsupdate
Info : Update PTS-Edition Info : Update PTS-Edition
- name: pandaura - name: PTS
command: pandaura command: plexguide
Info: Open Pandaura Interface Info: Open PTS Interface
- name: server reboot - name: server reboot
command: reboot command: reboot

View File

@@ -18,7 +18,7 @@ question1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⌛ Cron - Would you like to schedule Cron Jobs (Backups) for $program? ⌛ Cron - Schedule Cron Jobs (Backups) | $program?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] No [ 1 ] No
@@ -27,13 +27,13 @@ question1() {
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [ "$typed" == "1" ]; then if [ "$typed" == "1" ]; then
ansible-playbook /opt/plexguide/menu/cron/remove.yml && exit ansible-playbook /opt/plexguide/menu/cron/remove.yml && exit
elif [ "$typed" == "2" ]; then elif [ "$typed" == "2" ]; then
break="on" break="on"
else badinput; fi else badinput; fi
} }
# SECOND QUESTION # SECOND QUESTION
@@ -41,10 +41,10 @@ question2() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⌛ Cron - How often and when do you want to run backups? ⌛ Cron - Backup How Often?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WEEKLY BACKUP SCHEDULE WEEKLY
[ 0 / 7 ] - Sunday [ 0 / 7 ] - Sunday
[ 1 ] - Monday [ 1 ] - Monday
@@ -54,7 +54,7 @@ WEEKLY BACKUP SCHEDULE
[ 5 ] - Friday [ 5 ] - Friday
[ 6 ] - Saturday [ 6 ] - Saturday
DAILY BACKUPS DAILY
[ 8 ] - Daily [ 8 ] - Daily
RANDOM RANDOM
@@ -62,12 +62,12 @@ RANDOM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" -ge "0" && "$typed" -le "7" ]]; then echo $typed >/var/plexguide/cron/cron.day && break=1; if [[ "$typed" -ge "0" && "$typed" -le "7" ]]; then echo $typed >/var/plexguide/cron/cron.day && break=1;
elif [ "$typed" == "8" ]; then echo "*" > /var/plexguide/cron/cron.day && break=1; elif [ "$typed" == "8" ]; then echo "*" > /var/plexguide/cron/cron.day && break=1;
elif [ "$typed" == "9" ]; then echo $RAN >/var/plexguide/cron/cron.day && break=1; elif [ "$typed" == "9" ]; then echo $RAN >/var/plexguide/cron/cron.day && break=1;
else badinput; fi else badinput; fi
} }
@@ -76,7 +76,7 @@ question3() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⌛ Cron - Select time of the day? ⌛ Cron - Hour of the Day?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Type an HOUR from [0 to 23] Type an HOUR from [0 to 23]
@@ -87,11 +87,11 @@ Type an HOUR from [0 to 23]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type a Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type a Number | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" -ge "0" && "$typed" -le "23" ]]; then if [[ "$typed" -ge "0" && "$typed" -le "23" ]]; then
echo $typed >/var/plexguide/cron/cron.hour && break=1 echo $typed >/var/plexguide/cron/cron.hour && break=1
else badinput; fi else badinput; fi
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################

View File

@@ -4,176 +4,15 @@
# Author(s): Admin9705 - Deiteq # Author(s): Admin9705 - Deiteq
# URL: https://pgblitz.com - http://github.pgblitz.com # URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ #################################################################################
program=$(cat /tmp/program_var)
cname=$program
if [[ -f "/var/plexguide/$program.cname" ]]; then # KEY VARIABLE RECALL & EXECUTION
cname=$(cat /var/plexguide/$program.cname) mkdir -p /var/plexguide/cron/
fi mkdir -p /opt/appdata/plexguide/cron
# FUNCTIONS START ##############################################################
source /opt/plexguide/menu/functions/functions.sh
domain=$(cat /var/plexguide/server.domain) weekrandom() {
port=$(cat /tmp/program_port)
ip=$(cat /var/plexguide/server.ip)
ports=$(cat /var/plexguide/server.ports)
hdpath=$(cat /var/plexguide/server.hd.path)
if [ "$program" == "plex" ]; then extra="/web"; else extra=""; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Access configuration info
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
tee <<-EOF
▫ https://$program:${port} <- Use this as the url when connecting another app to $program.
EOF
if [ "$ports" == "" ]; then
tee <<-EOF
▫ https://$ip:${port}${extra}
EOF
fi
if [ "$domain" != "NOT-SET" ]; then
if [ "$ports" == "" ]; then
tee <<-EOF
▫ $domain:${port}${extra}
EOF
fi
tee <<-EOF
▫ $cname.$domain${extra}
EOF
fi
if [ "$program" == "plex" ]; then
tee <<-EOF
First Time Plex Claim Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
if [ "$domain" != "NOT-SET" ]; then
tee <<-EOF
▫ http://plex.${domain}:32400 <-- Use http; not https
EOF
fi
tee <<-EOF
▫ $ip:${port}${extra}
EOF
fi
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Manual configuration required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$program requires additional manual configuration
EOF
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]] || [[ "$program" == *"qbittorrent"* ]]; then
tee <<-EOF
$program requires "downloader mappings" to enable hardlinking and rapid importing.
If you do not have these mappings, $program can't rename and move the files on import.
This will result in files being copied instead of moved, and it will cause other issues.
The mappings are on the download client settings (advanced setting), at the bottom of the page.
Visit https://github.com/Pandaura/PTS-Team/wiki/Remote-Path-Mappings for more information.
EOF
fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Failure to perform manual configuration changes will cause problems
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌍 Visit the wiki for instructions on how to configure $program.
https://github.com/Pandaura/PTS-Team/wiki/$program
EOF
fi
####--------
if [[ "$program" == *"sabnzbd"* ]] || [[ "$program" == *"nzbget"* ]] ; then
cclean=$(cat /var/plexguide/cloneclean)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 NOTE / INFO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For incomplete downloads $program uses the folder $hdpath/incomplete/nzb
For finished downloads $program uses the folder $hdpath/downloads/nzb
beware the cloneclean is set to $cclean min
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [[ "$program" == *"sabnzbd"* ]] ; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Sabnzbd api_key = $sbakey
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [[ "$program" == *"rutorrent"* ]] || [[ "$program" == *"qbittorrent"* ]] || [[ "$program" == *"deluge"* ]]; then
cclean=$(cat /var/plexguide/cloneclean)
tclean=$(($cclean*2))
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 NOTE / INFO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For incomplete downloads $program uses the folder $hdpath/incomplete/nzb
For finished downloads $program uses the folder $hdpath/downloads/nzb
Beware that CloneClean is set to $tclean min
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [ "$program" == "plex" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Manual configuration required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
We prefer using plex_autoscan, unlike other alternatives,
that does not put a lot of pressure on the API of your Google account.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [ "$hdpath" != "/mnt" ]; then
sbakey=$(cat /opt/appdata/sabnzbd/sabnzbd.ini | grep "api_key" | head -n 1 | awk '{print $3}')
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You must add /mnt self to the docker container again
Your $hdpath is not /mnt
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
while read p; do while read p; do
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
echo $(($RANDOM % 23)) >/var/plexguide/cron/cron.hour echo $(($RANDOM % 23)) >/var/plexguide/cron/cron.hour
@@ -208,20 +47,20 @@ question1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PTS Cron - Schedule Cron Jobs (Backups) | Mass Program Interface PTS Cron - Schedule Cron Jobs (Backups) | Mass Program Interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Reference: https://github.com/Pandaura/PTS-Team/wiki/PTS-Cron Reference: https://github.com/MHA-Team/PTS-Team/wiki/PTS-Cron
[1] Skip - All Cron Jobs] [1] No [Skip - All Cron Jobs]
[2] Manual - Select for each app] [2] Yes [Manual - Select for Each App]
[3] Daily - Select random times] [3] Yes [Daily - Select Random Times]
[4] Weekly - Select random times & days] [4] Yes [Weekly - Select Random Times & Days]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [ "$typed" == "1" ]; then if [ "$typed" == "1" ]; then
exit exit
elif [ "$typed" == "2" ]; then elif [ "$typed" == "2" ]; then

View File

@@ -19,9 +19,9 @@ emergency(){
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning Emergency & Warning Log Generator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: This can be turned [On] or [Off] in Settings. NOTE: This can be turned [On] or Off in Settings!
EOF EOF
@@ -32,7 +32,7 @@ EOF
done <<<"$(ls /opt/appdata/plexguide/emergency)" done <<<"$(ls /opt/appdata/plexguide/emergency)"
echo echo
read -n 1 -s -r -p "Acknowledge info | Press [ENTER]" read -n 1 -s -r -p "Acknowledge Info | Press [ENTER]"
echo echo
else else
touch ${abc}/emergency.log touch ${abc}/emergency.log

View File

@@ -9,12 +9,12 @@
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - Bad Input! | Press [ENTER] ' typed </dev/tty read -p ' ERROR - Bad Input! | Press [ENTER] ' typed </dev/tty
} }
badinput1() { badinput1() {
echo echo
read -p ' ERROR - Bad Input! | Press [ENTER] ' typed </dev/tty read -p ' ERROR - Bad Input! | Press [ENTER] ' typed </dev/tty
question1 question1
} }

View File

@@ -26,6 +26,7 @@ pginstall() {
core docstart core docstart
rollingpart rollingpart
portainer portainer
oruborus
core motd core motd
core gcloud core gcloud
core cleaner core cleaner
@@ -35,6 +36,7 @@ pginstall() {
core mountcheck core mountcheck
emergency emergency
pgdeploy pgdeploy
# oruborus
} }
############################################################ INSTALLER FUNCTIONS ############################################################ INSTALLER FUNCTIONS
@@ -112,6 +114,16 @@ updateprime() {
echo "21" >${abc}/pg.mountcheck echo "21" >${abc}/pg.mountcheck
echo "11" >${abc}/pg.watchtower echo "11" >${abc}/pg.watchtower
} }
oruborus() {
wstatus=$(docker ps --format '{{.Names}}' | grep "watchtower")
if [[ "$wstatus" == "watchtower" ]]; then
docker stop watchtower >/dev/null 2>&1
docker rm watchtower >/dev/null 2>&1
ansible-playbook /opt/plexguide/menu/functions/ouroboros.yml
fi
ostatus=$(docker ps --format '{{.Names}}' | grep "ouroboros")
if [[ "$ostatus" != "ouroboros" ]]; then ansible-playbook /opt/plexguide/menu/functions/ouroboros.yml; fi
}
gcecheck() { gcecheck() {
gcheck=$(dnsdomainname | tail -c 10) gcheck=$(dnsdomainname | tail -c 10)
if [[ "$gcheck" == ".internal" ]]; then if [[ "$gcheck" == ".internal" ]]; then

View File

@@ -11,24 +11,28 @@ question1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 System & network auditor 📂 System & Network Auditor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] System & network benchmark - Basic [1] System & Network Benchmark - Basic
[2] System & network benchmark - Advanced [2] System & Network Benchmark - Advanced
[3] Simple speedtest [3] Simple SpeedTest
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
end_menu
# Standby # Standby
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) 1)
sudo wget -qO- bench.sh | bash sudo wget -qO- bench.sh | bash
echo "" echo ""
read -p ' Process Complete | Press [ENTER] ' typed </dev/tty read -p '🌍 Process Complete | Press [ENTER] ' typed </dev/tty
question1 question1
;; ;;
2) 2)
@@ -36,13 +40,13 @@ end_menu
echo "" echo ""
curl -LsO git.io/bench.sh; chmod +x bench.sh && ./bench.sh -a curl -LsO git.io/bench.sh; chmod +x bench.sh && ./bench.sh -a
echo "" echo ""
read -p ' Process Complete | Press [ENTER] ' typed </dev/tty read -p '🌍 Process Complete | Press [ENTER] ' typed </dev/tty
question1 question1
;; ;;
3) 3)
curl -LsO git.io/bench.sh; chmod +x bench.sh && ./bench.sh -speed curl -LsO git.io/bench.sh; chmod +x bench.sh && ./bench.sh -speed
echo "" echo ""
read -p ' Process Complete | Press [ENTER] ' typed </dev/tty read -p '🌍 Process Complete | Press [ENTER] ' typed </dev/tty
question1 ;; question1 ;;
z) exit ;; z) exit ;;
Z) exit ;; Z) exit ;;

View File

@@ -0,0 +1,66 @@
#!/bin/bash
# Title: ouroboros
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Ensure Monitors File Exists'
copy:
content: ''
dest: '/var/plexguide/pgupdater.output'
force: 'no'
group: '1000'
owner: '1000'
mode: '0755'
- name: 'Register Monitor List'
shell: 'cat /var/plexguide/pgupdater.output'
register: 'pgupdater'
- name: 'Set Known Facts'
set_fact:
pgrole: 'ouroboros'
- name: 'Setting {{pgrole}} Volumes'
set_fact:
pg_volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting {{pgrole}} ENV'
set_fact:
pg_env:
LATEST: 'false' #Some containers will break if set to latest, use tag already set by setting this to false
CLEANUP: 'true'
INTERVAL: '86400' #cEvery 24 hours in seconds
LOG_LEVEL: 'info'
SELF_UPDATE: 'true'
MONITOR: '{{pgupdater.stdout}}' #Can set to specific container only see wiki for details (https://github.com/pyouroboros/ouroboros/wiki/Usage#monitor)
IGNORE: 'mariadb influxdb mongo postgres plexautoscan'
LABELS_ONLY: 'false' #https://github.com/pyouroboros/ouroboros/wiki/Usage#label-enable
LABEL_ENABLE: 'false'
# DATA_EXPORT: 'influxdb'
# INFLUX_URL: 'influxdb'
# INFLUX_PORT: '8086'
# INFLUX_USERNAME: 'admin'
# INFLUX_PASSWORD: 'adminpass'
# INFLUX_DATABASE: 'ouroboros'
# INFLUX_SSL: 'false'
# INFLUX_VERIFY_SSL 'false'
NOTIFIERS: ''
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: 'pyouroboros/ouroboros'
pull: yes
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- 'ouroboros'
state: started

File diff suppressed because it is too large Load Diff

View File

@@ -1,173 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Description: Do the Plex Dance!
Author: Blacktwin, SwiftPanda16
Requires: plexapi, requests
Original Dance moves
1. Move all files for the media item out of the directory your Library is looking at,
so Plex will not “see” it anymore
2. Scan the library (to detect changes)
3. Empty trash
4. Clean bundles
5. Double check naming schema and move files back
6. Scan the library
https://forums.plex.tv/t/the-plex-dance/197064
Script Dance moves
1. Create .plexignore file in affected items library root
.plexignore will contain:
# Ignoring below file for Plex Dance
*Item_Root/*
- if .plexignore file already exists in library root, append contents
2. Scan the library
3. Empty trash
4. Clean bundles
5. Remove or restore .plexignore
6. Scan the library
7. Optimize DB
Example:
Dance with rating key 110645
plex_dance.py --ratingKey 110645
From Unraid host OS
plex_dance.py --ratingKey 110645 --path /mnt/user
*Dancing only works with Show or Movie rating keys
**After Dancing, if you use Tautulli the rating key of the dancing item will have changed.
Please use this script to update your Tautulli database with the new rating key
https://gist.github.com/JonnyWong16/f554f407832076919dc6864a78432db2
"""
from __future__ import print_function
from __future__ import unicode_literals
from plexapi.server import PlexServer
from plexapi.server import CONFIG
import requests
import argparse
import time
import os
# Using CONFIG file
PLEX_URL = ''
PLEX_TOKEN = ''
IGNORE_FILE = "# Ignoring below file for Plex Dance\n{}"
if not PLEX_TOKEN:
PLEX_TOKEN = CONFIG.data['auth'].get('server_token')
if not PLEX_URL:
PLEX_URL = CONFIG.data['auth'].get('server_baseurl')
session = requests.Session()
# Ignore verifying the SSL certificate
session.verify = False # '/path/to/certfile'
# If verify is set to a path to a directory,
# the directory must have been processed using the c_rehash utility supplied
# with OpenSSL.
if session.verify is False:
# Disable the warning that the request is insecure, we know that...
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=session)
def section_path(section, filepath):
for location in section.locations:
if filepath.startswith(location):
return location
def refresh_section(sectionID):
plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=session)
section = plex.library.sectionByID(sectionID)
section.update()
time.sleep(10)
plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=session)
section = plex.library.sectionByID(sectionID)
while section.refreshing is True:
time.sleep(10)
print("Waiting for library to finish refreshing to continue dance.")
plex = PlexServer(PLEX_URL, PLEX_TOKEN, session=session)
section = plex.library.sectionByID(sectionID)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Do the Plex Dance!",
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('--ratingKey', nargs="?", type=int, required=True,
help='Rating key of item that needs to dance.')
parser.add_argument('--path', nargs="?", type=str,
help='Prefix path for libraries behind mount points.\n'
'Example: /mnt/user Resolves: /mnt/user/library_root')
opts = parser.parse_args()
item = plex.fetchItem(opts.ratingKey)
item.reload()
sectionID = item.librarySectionID
section = plex.library.sectionByID(sectionID)
old_plexignore = ''
if item.type == 'movie':
item_file = item.media[0].parts[0].file
locations = os.path.split(item.locations[0])
item_root = os.path.split(locations[0])[1]
library_root = section_path(section, locations[0])
elif item.type == 'show':
locations = os.path.split(item.locations[0])
item_root = locations[1]
library_root = section_path(section, locations[0])
else:
print("Media type not supported.")
exit()
library_root = opts.path + library_root if opts.path else library_root
plexignore = IGNORE_FILE.format('*' + item_root + '/*')
item_ignore = os.path.join(library_root, '.plexignore')
# Check for existing .plexignore file in library root
if os.path.exists(item_ignore):
# If file exists append new ignore params and store old params
with open(item_ignore, 'a+') as old_file:
old_plexignore = old_file.readlines()
old_file.write('\n' + plexignore)
# 1. Create .plexignore file
print("Creating .plexignore file for dancing.")
with open(item_ignore, 'w') as f:
f.write(plexignore)
# 2. Scan library
print("Refreshing library of dancing item.")
refresh_section(sectionID)
# 3. Empty library trash
print("Emptying Trash from library.")
section.emptyTrash()
time.sleep(5)
# 4. Clean library bundles
print("Cleaning Bundles from library.")
plex.library.cleanBundles()
time.sleep(5)
# 5. Remove or restore .plexignore
if old_plexignore:
print("Replacing new .plexignore with old .plexignore.")
with open(item_ignore, 'w') as new_file:
new_file.writelines(old_plexignore)
else:
print("Removing .plexignore file from dancing directory.")
os.remove(item_ignore)
# 6. Scan library
print("Refreshing library of dancing item.")
refresh_section(sectionID)
# 7. Optimize DB
print("Optimizing library database.")
plex.library.optimize()

View File

@@ -70,6 +70,54 @@
state: started state: started
labels: '{{pg_labels}}' labels: '{{pg_labels}}'
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'ouroboros'
- name: 'Setting {{pgrole}} Volumes'
set_fact:
pg_volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting {{pgrole}} ENV'
set_fact:
pg_env:
LATEST: 'true' #Some containers will break if set to latest, use tag already set by setting this to false
CLEANUP: 'true'
INTERVAL: '86400' #cEvery 24 hours in seconds
LOG_LEVEL: 'info'
SELF_UPDATE: 'true'
MONITOR: '' #Can set to specific container only see wiki for details (https://github.com/pyouroboros/ouroboros/wiki/Usage#monitor)
IGNORE: 'mariadb influxdb mongo postgres'
LABELS_ONLY: 'false' #https://github.com/pyouroboros/ouroboros/wiki/Usage#label-enable
LABEL_ENABLE: 'false'
# DATA_EXPORT: 'influxdb'
# INFLUX_URL: 'influxdb'
# INFLUX_PORT: '8086'
# INFLUX_USERNAME: 'admin'
# INFLUX_PASSWORD: 'adminpass'
# INFLUX_DATABASE: 'ouroboros'
# INFLUX_SSL: 'false'
# INFLUX_VERIFY_SSL 'false'
NOTIFIERS: ''
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: 'pyouroboros/ouroboros'
pull: yes
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- 'ouroboros'
state: started
# FACTS ####################################################################### # FACTS #######################################################################
- name: 'Set Known Facts' - name: 'Set Known Facts'
set_fact: set_fact:

View File

@@ -9,21 +9,19 @@ source /opt/plexguide/menu/functions/functions.sh
abc="/var/plexguide" abc="/var/plexguide"
################################################################################ ################################################################################
serverid() { serverid() {
declare NF='\033[1;32m'
declare NC='\033[0m'
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Create a Server ID - Please use one word & keep it simple ↘️ Establishing Server ID 💬 Use One Word & Keep it Simple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '💬 TYPE Server ID | Press [ENTER]: ' typed </dev/tty read -p '🌏 TYPE Server ID | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "" ]]; then if [[ "$typed" == "" ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ WARNING! - The Server ID cannot be left blank! ⛔️ WARNING! - The Server ID Cannot Be Blank!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1 sleep 1
@@ -32,7 +30,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Server ID $(echo -e ${NF}$typed${NC}) stored ✔️ ✅️ PASS: Server ID $typed Established
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo "$typed" >${abc}/server.id echo "$typed" >${abc}/server.id
@@ -42,21 +40,19 @@ EOF
} }
#################################### ####################################
serveridnew() { serveridnew() {
declare NF='\033[1;32m'
declare NC='\033[0m'
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Create a Server ID - Please use one word & keep it simple ↘️ Establishing New Server ID 💬 Use One Word & Keep it Simple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '💬 TYPE Server ID | Press [ENTER]: ' typed </dev/tty read -p '🌏 TYPE Server ID | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "" ]]; then if [[ "$typed" == "" ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ WARNING! - The Server ID cannot be left blank! ⛔️ WARNING! - The Server ID Cannot Be Blank!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1 sleep 1
@@ -65,7 +61,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Server ID $(echo -e ${NF}$typed${NC}) stored ✔️ ✅️ PASS: Server ID $typed Established
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo "$typed" >${abc}/server.id echo "$typed" >${abc}/server.id
@@ -83,7 +79,7 @@ if [[ -e "$conf" ]]; then
rclone mkdir gdrive:/plexguide/backup/$(cat /var/plexguide/server.id) --config /opt/appdata/plexguide/rclone.conf;fi rclone mkdir gdrive:/plexguide/backup/$(cat /var/plexguide/server.id) --config /opt/appdata/plexguide/rclone.conf;fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Backup folder created on GDrive ✔️ ✅ PASS: Backup folder created on GDrive
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
fi fi
@@ -98,17 +94,17 @@ status=$(cat /var/plexguide/server.id)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Create a Server ID - Use one word & keep it simple ↘️ Establishing New Server ID 💬 Use One Word & Keep it Simple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Deploy new Server ID [1] Deploy New ServerID
[2] Use existing ones [ $status ] [2] use existing ones [ $status ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] - Exit [Z] - Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) serveridnew && clear && exit ;; 1) serveridnew && clear && exit ;;

View File

@@ -1,318 +1,71 @@
#!/bin/bash #!/bin/bash
# #
# Title: PTS major file # Title: PTS major file
# org.Author(s): Admin9705 - Deiteq # org.Author(s): Admin9705 - Deiteq
# Mod: Pandaura - history at bottom # Mod from MrDoob for PTS
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
source /opt/plexguide/menu/functions/functions.sh source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/install.sh source /opt/plexguide/menu/functions/install.sh
declare NY='\033[0;33m'
declare NC='\033[0m'
declare NG='\033[1;32m'
sudocheck() { sudocheck() {
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You must execute as a SUDO USER (with sudo) or as ROOT! You Must Execute as a SUDO USER (with sudo) or as ROOT!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
exit 0 exit 0
fi fi
} }
gitupdate() {
cd /opt/plexguide/
git fetch
UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM")
BASE=$(git merge-base @ "$UPSTREAM")
BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo "$BRANCH" > $filevg/panda.branch
if [ $LOCAL = $REMOTE ]; then
echo "Up-to-date" > $filevg/panda.update
elif [ $LOCAL = $BASE ]; then
echo "🌟 Update Available!🌟" > $filevg/panda.update
elif [ $REMOTE = $BASE ]; then
echo "Need to push" > $filevg/panda.update
else
echo "Diverged"
fi
}
test
downloadpg() { downloadpg() {
gitupdate rm -rf /opt/plexguide
update=$(cat /var/plexguide/panda.update) git clone --single-branch https://github.com/MHA-Team/PTS-Team.git /opt/plexguide 1>/dev/null 2>&1
dev=$(cat /var/plexguide/pgcloner.projectversion) ansible-playbook /opt/plexguide/menu/version/missing_pull.yml
BRANCH=$(cat /var/plexguide/panda.branch) ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
if [[ "dev" == "$dev" ]]; then rm -rf /opt/plexguide/place.holder >/dev/null 2>&1
if [[ "$BRANCH" == "master" ]]; then rm -rf /opt/plexguide/.git* >/dev/null 2>&1
#rm -rf /opt/plexguide 1>/dev/null 2>&1
git checkout -b dev origin/$dev 1>/dev/null 2>&1
git pull 1>/dev/null 2>&1
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
fi
if [[ "$update" == "🌟 Update Available!🌟" ]]; then
#rm -rf /opt/plexguide 1>/dev/null 2>&1
git checkout -b dev origin/$dev 1>/dev/null 2>&1
git pull 1>/dev/null 2>&1
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
fi
fi
if [[ "master" == "$dev" ]]; then
if [[ "$BRANCH" == "dev" ]]; then
#rm -rf /opt/plexguide 1>/dev/null 2>&1
git checkout -b dev origin/$dev 1>/dev/null 2>&1
git pull 1>/dev/null 2>&1
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
fi
if [[ "$update" == "🌟 Update Available!🌟" ]]; then
#rm -rf /opt/plexguide 1>/dev/null 2>&1
git checkout -b dev origin/$dev 1>/dev/null 2>&1
git pull 1>/dev/null 2>&1
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
fi
fi
} }
missingpull() { missingpull() {
file="/opt/plexguide/menu/functions/install.sh" file="/opt/plexguide/menu/functions/install.sh"
if [ ! -e "$file" ]; then if [ ! -e "$file" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Base folder is missing! Base folder went missing!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 2 sleep 2
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Re-downloading Pandaura 🍖 NOM NOM - Re-Downloading PTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 2 sleep 2
downloadpg downloadpg
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Repair complete. Standby! ✅️ Repair Complete! Standby!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 2 sleep 2
fi fi
} }
exitcheck() { exitcheck() {
bash /opt/plexguide/menu/version/file.sh bash /opt/plexguide/menu/version/file.sh
file="/var/plexguide/exited.upgrade" file="/var/plexguide/exited.upgrade"
if [ ! -e "$file" ]; then if [ ! -e "$file" ]; then
bash /opt/plexguide/menu/interface/ending.sh bash /opt/plexguide/menu/interface/ending.sh
else else
rm -rf /var/plexguide/exited.upgrade 1>/dev/null 2>&1 rm -rf /var/plexguide/exited.upgrade 1>/dev/null 2>&1
echo "" echo ""
bash /opt/plexguide/menu/interface/ending.sh bash /opt/plexguide/menu/interface/ending.sh
fi
}
edition=$(cat /var/plexguide/pg.edition)
serverid=$(cat /var/plexguide/server.id)
pgnumber=$(cat /var/plexguide/pg.number)
top_menu() {
if [[ $# -eq 0 ]]; then
menu=$pgnumber
else
menu=$1
fi
# Menu Interface
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 $transport $menu ID: $serverid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- SB-API Access: 🟢 - Internal API Access: 🟢 - $(echo -e $Memory)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$(echo -e $update)
Disk Used Space: $used of $capacity | $percentage Used Capacity
EOF
}
disk_space_used_space() {
# Displays Second Drive of GCE
edition=$(cat /var/plexguide/pg.server.deploy)
if [ "$edition" == "feeder" ]; then
used_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $3}')
capacity_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $2}')
percentage_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $5}')
echo " GCE disk used space: $used_gce of $capacity_gce | $percentage_gce Used Capacity"
fi
disktwo=$(cat "/var/plexguide/server.hd.path")
if [ "$edition" != "feeder" ]; then
used_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $3}')
capacity_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $2}')
percentage_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $5}')
if [[ "$disktwo" != "/mnt" ]]; then
echo " 2nd disk used space: $used_gce2 of $capacity_gce2 | $percentage_gce2 Used Capacity"
fi
fi fi
} }
main_menu() {
# For PG UI - Force Variable to Set
ports=$(cat /var/plexguide/server.ports)
if [ "$ports" == "" ]; then
echo "Open" >$filevg/pg.ports
else echo "Closed" >$filevg/pg.ports; fi
tee <<-EOF
[1] Networking : Reverse Proxy | Domain Setup
[2] Security : Secure your server
[3] Mount : Mount Cloud Based Storage
[4] Apps : Apps ~ Core, Community & Removal
[5] Vault : Backup & Restore
-------------------------------------------------------------------------
[8] Tools : Tools
[9] IRC : Matrix chat client to Discord
[0] Settings : Settings
EOF
}
end_menu() {
tee <<-EOF
_________________________________________________________________________
[Z] Exit
https://discord.sudobox.io https://sudobox.io/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
}
end_menu_back() {
tee <<-EOF
_________________________________________________________________________
[Z] Back
https://discord.sudobox.io https://sudobox.io/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
}
sub_menu_networking() { # first sub menu
tee <<-EOF
[1]$(echo -e ${NG}Networking${NC}) : Reverse Proxy | Domain Setup
[E] Reverse Proxy - Setup a domain using Traefik [🟢 ]
[2] Security : Secure your server
[3] Mount : Mount Cloud Based Storage
[4] Apps : Apps ~ Core, Community & Removal
[5] Vault : Backup & Restore
-------------------------------------------------------------------------
[8] Tools : Tools
[9] IRC : Matrix chat client to Discord
[0] Settings : Settings
EOF
}
sub_menu_security() { # Menu Interface
tee <<-EOF
[1] Networking : Reverse Proxy | Domain Setup
[2] $(echo -e ${NG}Security${NC}) : Secure your server
[E] Shield - Single Sign-On MFA Portal [🟢 ]
[D] PortGuard - Close vulnerable container ports [🟢 ]
[C] VPN - Setup a secure network [🟢 ]
[3] Mount : Mount Cloud Based Storage
[4] Apps : Apps ~ Core, Community & Removal
[5] Vault : Backup & Restore
-------------------------------------------------------------------------
[8] Tools : Tools
[9] IRC : Matrix chat client to Discord
[0] Settings : Settings
EOF
}
sub_menu_mount() { # first sub menu
tee <<-EOF
[1]Networking : Reverse Proxy | Domain Setup
[2] Security : Secure your server
[3] $(echo -e ${NG}Mount${NC}) : Mount Cloud based storage
[E] Mount Settings
[D] Deploy Uploader
[C] Add keys
--$(echo -e ${NY}UPDATE MOUNT DETAILS${NC})--
[R] Update credentials - Setup a secure network
[F] Update mount options - Setup a secure network
[4] Apps : Apps ~ Core, Community & Removal
[5] Vault : Backup & Restore
-------------------------------------------------------------------------
[8] Tools : Tools
[9] IRC : Matrix chat client to Discord
[0] Settings : Settings
EOF
}
sub_menu_app() { # Menu Interface
tee <<-EOF
[1] Networking : Reverse Proxy | Domain Setup
[2] Security : Secure your server
[3] Mount : Mount Cloud Based Storage
[4] $(echo -e ${NG}Apps${NC}) : Apps ~ Core, Community & Removal
--$(echo -e ${NY}INSTALL${NC})--
[E] Core 11/11
[D] Community apps 11/11
[C] Personal apps
--$(echo -e ${NY}REMOVE${NC})--
[R] Remove apps
[F] Full wipe (appdata too) # needs research
--$(echo -e ${NY}UPDATE${NC})--
[V] Update app
[T] Update app subdomain
--$(echo -e ${NY}THEMES${NC})--
[5] Vault : Backup & Restore
-------------------------------------------------------------------------
[8] Tools : Tools
[9] IRC : Matrix chat client to Discord
[0] Settings : Settings
EOF
}
sub_menu_vault() { # Menu Interface
tee <<-EOF
[1] Networking : Reverse Proxy | Domain Setup
[2] Security : Secure your server
[3] Mount : Mount Cloud Based Storage
[4] Apps$ : Apps ~ Core, Community & Removal
[5] $(echo -e ${NG}Vault${NC}) : Backup & Restore
--$(echo -e ${NY}BACKUP${NC})--
[E] Backup menu
-------------------------------------------------------------------------
[8] Tools : Tools
[9] IRC : Matrix chat client to Discord
[0] Settings : Settings
EOF
}
# Previous modders - MrDoob
#[E] Backup a container 11/11
# [D] Backup all
# --$(echo -e ${NY}RESTORE${NC})--
# [C] Restore a container
#[R] Restore all
#--$(echo -e ${NY}Processing Location${NC})--
#[F] Change location

View File

@@ -12,7 +12,7 @@ sudocheck() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You must execute as a SUDO USER (with sudo) or as ROOT! You Must Execute as a SUDO USER (with sudo) or as ROOT!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -31,12 +31,12 @@ tee <<-EOF
mergerfs installed version = $mgstored mergerfs installed version = $mgstored
mergerfs latest version = $mgversion mergerfs latest version = $mgversion
[Y] UPDATE to latest version [Y] UPDATE to lateste version
[Z] Exit [Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
@@ -55,18 +55,18 @@ rcstored="$(rclone --version | awk '{print $2}' | tail -n 3 | head -n 1)"
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rclone update panel $rcstored rClone Update Panel $rcstored
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rclone installed version = $rcstored rclone installed version = $rcstored
Rclone latest version = $rcversion rclone latest version = $rcversion
[Y] UPDATE to latest version [Y] UPDATE to lateste version
[Z] Exit [Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
Y) ansible-playbook /opt/plexguide/menu/pg.yml --tags rcloneinstall && $check ;; Y) ansible-playbook /opt/plexguide/menu/pg.yml --tags rcloneinstall && $check ;;

View File

@@ -21,7 +21,7 @@ source /opt/plexguide/menu/gce/functions/destroy.sh
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
gcestart gcestart
} }
sudocheck() { sudocheck() {
@@ -29,7 +29,7 @@ sudocheck() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You Must Execute as a SUDO USER (with sudo) or as ROOT! You Must Execute as a SUDO USER (with sudo) or as ROOT!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -63,7 +63,7 @@ gcestart() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 GCE Deployment 🌎 GCE Deployment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] Log Into the Account : [ $account ] [ 1 ] Log Into the Account : [ $account ]

View File

@@ -17,7 +17,7 @@ deployserver() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 ERROR: GCE Instance Already Detected 🚀 ERROR: GCE Instance Already Detected
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFORMATION: The prior GCE Server must be deleted prior to deloying a INFORMATION: The prior GCE Server must be deleted prior to deloying a
@@ -36,7 +36,7 @@ EOF
#tee <<-EOF #tee <<-EOF
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ #━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#🛈 Deleting Old IP Address #🚀 Deleting Old IP Address
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ #━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#EOF #EOF
@@ -50,7 +50,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Creating Firewall Rules | Does Not Exist 🚀 Creating Firewall Rules | Does Not Exist
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -65,7 +65,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Deleting Old Template 🚀 Deleting Old Template
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -99,7 +99,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Finalizing - Assigned IP Address to Instance 🚀 Finalizing - Assigned IP Address to Instance
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF

View File

@@ -16,7 +16,7 @@ destroyserver() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: No GCE Server Deployed! Exiting! 🌎 SYSTEM MESSAGE: No GCE Server Deployed! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -33,7 +33,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Destroying Server - Can Take Awhile! 🌎 SYSTEM MESSAGE: Destroying Server - Can Take Awhile!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -43,7 +43,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Releasing IP Address 🌎 SYSTEM MESSAGE: Releasing IP Address
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -64,7 +64,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Process Complete! 🌎 SYSTEM MESSAGE: Process Complete!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF

View File

@@ -12,7 +12,7 @@ billingdeny() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 MESSAGE TYPE: ERROR 🌎 MESSAGE TYPE: ERROR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REASON: Billing Failed REASON: Billing Failed
@@ -35,7 +35,7 @@ EOF
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
projectinterface projectinterface
} }
@@ -58,7 +58,7 @@ deployfail() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Deployment Checks Failed! 🌎 Deployment Checks Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Unfortunately, the deploy failed, Unfortunately, the deploy failed,
@@ -86,7 +86,7 @@ clear
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 GCE Calculaor 🚀 GCE Calculaor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
if they want to know what an instance would cost them; click on this link, if they want to know what an instance would cost them; click on this link,
@@ -107,7 +107,7 @@ nvmecount() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 NVME Count 🌎 NVME Count
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Most users will only need to utilize 1 - 2 NVME Drives. Most users will only need to utilize 1 - 2 NVME Drives.
@@ -149,7 +149,7 @@ ramcount() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 RAM Count 🌎 RAM Count
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Most users will only need to utilize 8 Gb Ram. Most users will only need to utilize 8 Gb Ram.
@@ -172,7 +172,7 @@ imagecount() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 OS Image 🌎 OS Image
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] Ubuntu 1804 = Public OS Image [ 1 ] Ubuntu 1804 = Public OS Image
@@ -200,7 +200,7 @@ processorcount() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Processor Count 🌎 Processor Count
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFORMATION: INFORMATION:
@@ -226,7 +226,7 @@ projectinterface() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Project Interface 🌎 Project Interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Project ID: [ $projectid ] Project ID: [ $projectid ]
@@ -250,7 +250,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Utilize/Change Existing Project 🌎 Utilize/Change Existing Project
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
QUESTION: QUESTION:
@@ -300,7 +300,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PLEASE WAIT! Enabling Billing ~ Project $typed 🌎 PLEASE WAIT! Enabling Billing ~ Project $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -310,7 +310,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PLEASE WAIT! Enabling Compute API ~ Project $typed 🌎 PLEASE WAIT! Enabling Compute API ~ Project $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -319,7 +319,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PLEASE WAIT! Enabling Drive API ~ Project $typed 🌎 PLEASE WAIT! Enabling Drive API ~ Project $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -329,7 +329,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 NOTICE: Project Default Set ~ $typed 🌎 NOTICE: Project Default Set ~ $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -345,7 +345,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Create & Set a Project Name 🌎 Create & Set a Project Name
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INSTRUCTIONS: INSTRUCTIONS:
@@ -375,7 +375,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Project Message 🌎 Project Message
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFO: $projectfinal created. INFO: $projectfinal created.
@@ -396,7 +396,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Delete Existing Projects 🌎 Delete Existing Projects
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING : Deleting projects will result in deleting keys that are WARNING : Deleting projects will result in deleting keys that are
@@ -448,7 +448,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 System Message: Project Deleted ~ $typed 🌎 System Message: Project Deleted ~ $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -475,7 +475,7 @@ noprojects() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 No Projects Exist 🌎 No Projects Exist
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING: No projects exists! Cannot delete the default active project if WARNING: No projects exists! Cannot delete the default active project if
@@ -495,7 +495,7 @@ projectdeny() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 MESSAGE TYPE: ERROR 🌎 MESSAGE TYPE: ERROR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REASON: Project ID Not Set REASON: Project ID Not Set

View File

@@ -34,7 +34,7 @@ regioncenter() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Select a GCE Region 🚀 Select a GCE Region
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ $profinal ] [ $profinal ]

View File

@@ -15,7 +15,7 @@ file2="/var/plexguide/gce.check"
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You Must Execute as a SUDO USER (with sudo) or as ROOT! You Must Execute as a SUDO USER (with sudo) or as ROOT!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF

View File

@@ -31,7 +31,7 @@ if [ "$test" == "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - You Must Input an API Token from Hetzner First! WARNING! - You Must Input an API Token from Hetzner First!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 } Activate a Hetzner Cloud Account [ 1 } Activate a Hetzner Cloud Account
@@ -141,7 +141,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Deploying Your Server! 🚀 Deploying Your Server!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -237,7 +237,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Server: $destroy - Does Not Exist! Server: $destroy - Does Not Exist!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF

View File

@@ -7,14 +7,14 @@
################################################################################ ################################################################################
source /opt/plexguide/menu/functions/install.sh source /opt/plexguide/menu/functions/install.sh
emergency emergency
file="/bin/pandaura" file="/bin/pts"
if [[ ! -f "/bin/pandaura" ]]; then if [[ ! -f "/bin/pts" ]]; then
cp /opt/plexguide/menu/alias/templates/pts /bin && chown 1000:1000 /bin/pandaura && chmod 0755 /bin/pandaura; fi cp /opt/plexguide/menu/alias/templates/pts /bin && chown 1000:1000 /bin/pts && chmod 0755 /bin/pts; fi
# #
clear clear
printf ' printf '
┌─────────────────────────────────────┐ ┌─────────────────────────────────────┐
│ -== Pandaura ==- -== Team PTS ==- │
│ ————————————————————————————————————│ │ ————————————————————————————————————│
│ Restart PTS: pts │ │ Restart PTS: pts │
│ Update PTS: ptsupdate │ │ Update PTS: ptsupdate │
@@ -22,13 +22,20 @@ clear
│ Download Your PTS Fork: pgfork │ │ Download Your PTS Fork: pgfork │
│ │ │ │
│ ————————————————————————————————————│ │ ————————————————————————————————————│
│ Thanks For being a part of the team │ │ Thanks For Being Part of the Team
│ │ │ │
│ Thanks to: │ │ Thanks to: │
│ │ │ │
Hawkinzzz, Syndrogo, Anap_ Davaz, Deiteq, FlickerRate,
Xaritomi, Demon, Man1234, ClownFused, MrDoob, Sub7Seven,
Pianomanx, xr3negadex, salty, │ | TimeKills, The_Creator, Desimaniac, │
│ l3uddz, RXWatcher, Calmcacil, │
│ ΔLPHΔ , Maikash , Porkie │
│ CDN_RAGE , hawkinzzz , The_DeadPool │
│ BugHunter : Krallenkiller │
│ │ │ │
└─────────────────────────────────────┘ └─────────────────────────────────────┘
' '

View File

@@ -38,8 +38,6 @@ else
echo "command_warnings = False" >>/etc/ansible/ansible.cfg echo "command_warnings = False" >>/etc/ansible/ansible.cfg
echo "callback_whitelist = profile_tasks" >>/etc/ansible/ansible.cfg echo "callback_whitelist = profile_tasks" >>/etc/ansible/ansible.cfg
echo "inventory = /etc/ansible/inventories/local" >>/etc/ansible/ansible.cfg echo "inventory = /etc/ansible/inventories/local" >>/etc/ansible/ansible.cfg
echo "no_target_syslog = True" >>/etc/ansible/ansible.cfg
echo "syslog_facility = LOG_USER" >>/etc/ansible/ansible.cfg
### Disabling cows for people that have cowsay installed ### Disabling cows for people that have cowsay installed
echo "nocows = 1" >>/etc/ansible/ansible.cfg echo "nocows = 1" >>/etc/ansible/ansible.cfg

View File

@@ -14,27 +14,27 @@ abc="/var/plexguide"
serverid() { serverid() {
if [[ "$start" != "$stored" ]]; then if [[ "$start" != "$stored" ]]; then
clear
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Create a Server ID - Please use one word & keep it simple ↘️ Establishing New Server ID 💬 Use One Word & Keep it Simple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '💬 TYPE Server ID | Press [ENTER]: ' typed </dev/tty read -p '🌏 TYPE Server ID | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "" ]]; then if [[ "$typed" == "" ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ WARNING! - The Server ID cannot be blank! ⛔️ WARNING! - The Server ID Cannot Be Blank!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1 sleep 3
serverid serverid
exit exit
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Server ID $(echo -e ${NF}$typed${NC}) stored ✔️ ✅️ PASS: New ServerID Set
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF

View File

@@ -6,22 +6,18 @@
# URL: https://pgblitz.com - http://github.pgblitz.com # URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
typed="${typed,,}"
source /opt/plexguide/menu/functions/functions.sh source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/install.sh source /opt/plexguide/menu/functions/install.sh
################################################################################ ################################################################################
source /opt/plexguide/menu/functions/serverid.sh source /opt/plexguide/menu/functions/serverid.sh
source /opt/plexguide/menu/functions/nvidia.sh source /opt/plexguide/menu/functions/nvidia.sh
source /opt/plexguide/menu/functions/uichange.sh source /opt/plexguide/menu/functions/uichange.sh
branch="cat /var/plexguide/pgcloner.projectversion"
dev="sed -i '1s/.*/dev/' $branch"
final="sed -i '1s/.*/final/' $branch"
rcdupe() { rcdupe() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 RClone dedupe 🚀 RClone dedupe
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFO AND NOTE INFO AND NOTE
Interactively find duplicate files and delete/rename them. Interactively find duplicate files and delete/rename them.
@@ -89,7 +85,7 @@ touch /var/plexguide/pgui.switch
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 Settings Interface Menu 🚀 Settings Interface Menu
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] MultiHD : Add Multiple HDs and/or Mount Points to MergerFS [1] MultiHD : Add Multiple HDs and/or Mount Points to MergerFS
@@ -99,11 +95,9 @@ touch /var/plexguide/pgui.switch
[5] Server ID change : Change your ServerID [5] Server ID change : Change your ServerID
[6] NVIDIA Docker Role : NVIDIA Docker [6] NVIDIA Docker Role : NVIDIA Docker
[7] RCLONE DEDUPE [7] RCLONE DEDUPE
--------------------------------------------------------------------------
[T] TroubleShoot : PreInstaller [99] TroubleShoot : PreInstaller
[B] Change Branch : Change Github
[U] Updater : Update fork automatically
__________________________________________________________________________
[Z] Exit [Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -126,38 +120,11 @@ EOF
6) nvidia && clear && setstart ;; 6) nvidia && clear && setstart ;;
7) rcdupe ;; 7) rcdupe ;;
########################################################################### ###########################################################################
t) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;; 99) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;;
T) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;;
B) branch && clear && setstart ;;
z) exit ;; z) exit ;;
Z) exit ;; Z) exit ;;
*) setstart ;; *) setstart ;;
esac esac
} }
branch(){ setstart
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💪 Set Pandaura branch
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Here you can set which Pandaura branch you wish to use.
Type on of the following to continue:
final
dev
--------------------------------------------------------------------------
Current Branch : $branch
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '↘️ Type in a branch | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "" ]]; then setstart; fi
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then setstart; fi
if [[ "$typed" == "dev" ]]; then $dev; fi
if [[ "$typed" == "dev" ]]; then $final; fi
}
setstart

View File

@@ -7,7 +7,6 @@
################################################################################ ################################################################################
rm -rf /var/plexguide/ver.temp 1>/dev/null 2>&1 rm -rf /var/plexguide/ver.temp 1>/dev/null 2>&1
touch /var/plexguide/ver.temp touch /var/plexguide/ver.temp
typed="${typed,,}"
sleep 4 sleep 4
## Builds Version List for Display ## Builds Version List for Display
@@ -32,7 +31,7 @@ while [ "$break" == "no" ]; do
read -p '↘️ Type | PRESS ENTER: ' typed read -p '↘️ Type | PRESS ENTER: ' typed
storage=$(grep $typed /var/plexguide/ver.temp) storage=$(grep $typed /var/plexguide/ver.temp)
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
echo "" echo ""
touch /var/plexguide/exited.upgrade touch /var/plexguide/exited.upgrade
exit exit
@@ -54,7 +53,7 @@ EOF
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SYSTEM MESSAGE: Version $storage does not exist! - Standby! SYSTEM MESSAGE: Version $storage does not exist! - Standby!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 4 sleep 4

View File

@@ -81,4 +81,8 @@ $W Storage - Cloud
$W GDrive | uncrypted : $G$gdrive $W GDrive | uncrypted : $G$gdrive
$W TDrive | uncrypted : $G$tdrive $W TDrive | uncrypted : $G$tdrive
$W GDrive | crypted : $G$gcrypt $W GDrive | crypted : $G$gcrypt
$W TDrive | crypted : $G$tcrypt $W TDrive | crypted : $G$tcrypt
$W %++++++++++ WISE WORD OF THE DAY ++++++++++%
$W $W$wisword
$W %++++++++++ WISE WORD OF THE DAY ++++++++++%"

View File

@@ -6,11 +6,11 @@
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
removepoint() { removepoint() {
rolevars rolevars
# Nothing Exist; kick user back to main menu # Nothing Exist; kick user back to main menu
frontoutput=$(cat /var/plexguide/multihd.paths) frontoutput=$(cat /var/plexguide/multihd.paths)
if [[ "$frontoutput" == "" ]]; then if [[ "$frontoutput" == "" ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -23,18 +23,18 @@ that does not exist! EXITING!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -rp '↘️ Acknowledge Info | Press [ENTER] ' typed </dev/tty read -rp '↘️ Acknowledge Info | Press [ENTER] ' typed </dev/tty
multihdstart multihdstart
fi fi
inputphase inputphase
} }
inputphase() { inputphase() {
typed="${typed,,}"
rm -rf /var/plexguide/.tmp.removepointmenu 1>/dev/null 2>&1 rm -rf /var/plexguide/.tmp.removepointmenu 1>/dev/null 2>&1
# Starting Process # Starting Process
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -43,44 +43,44 @@ inputphase() {
NOTE: Type a number selection in order to remove one of the HD/Mountpoints NOTE: Type a number selection in order to remove one of the HD/Mountpoints
EOF EOF
num=0 num=0
while read p; do while read p; do
((num++)) ((num++))
echo "[$num] $p" echo "[$num] $p"
echo "[$num] $p" >>/var/plexguide/.tmp.removepointmenu echo "[$num] $p" >>/var/plexguide/.tmp.removepointmenu
done </var/plexguide/multihd.paths done </var/plexguide/multihd.paths
tee <<-EOF tee <<-EOF
Quitting? Type >>> exit Quitting? Type >>> exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -rp '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -rp '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then multihdstart; fi if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then multihdstart; fi
if [[ "$typed" == "" ]]; then inputphase; fi if [[ "$typed" == "" ]]; then inputphase; fi
if [[ "$typed" -ge "1" && "$typed" -le "$num" ]]; then removepointfinal; fi if [[ "$typed" -ge "1" && "$typed" -le "$num" ]]; then removepointfinal; fi
inputphase inputphase
} }
removepointfinal() { removepointfinal() {
cat /var/plexguide/.tmp.removepointmenu | grep "$typed" >/var/plexguide/.tmp.removepointmenu.select cat /var/plexguide/.tmp.removepointmenu | grep "$typed" >/var/plexguide/.tmp.removepointmenu.select
removestore=$(cat /var/plexguide/.tmp.removepointmenu.select | awk '{print $2}') removestore=$(cat /var/plexguide/.tmp.removepointmenu.select | awk '{print $2}')
rm -rf /var/plexguide/.tmp.removebuild 1>/dev/null 2>&1 rm -rf /var/plexguide/.tmp.removebuild 1>/dev/null 2>&1
num=0 num=0
while read p; do while read p; do
if [[ "$removestore" != "$p" ]]; then echo "$p" >>/var/plexguide/.tmp.removebuild; fi if [[ "$removestore" != "$p" ]]; then echo "$p" >>/var/plexguide/.tmp.removebuild; fi
done </var/plexguide/multihd.paths done </var/plexguide/multihd.paths
rm -rf /var/plexguide/multihd.paths rm -rf /var/plexguide/multihd.paths
cp /var/plexguide/.tmp.removebuild /var/plexguide/multihd.paths cp /var/plexguide/.tmp.removebuild /var/plexguide/multihd.paths
# Congrats! The Path Should Now Be Removed # Congrats! The Path Should Now Be Removed
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -97,7 +97,7 @@ through rClone!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -rp '↘️ Acknowledge Info | Press [ENTER] ' typed </dev/tty read -rp '↘️ Acknowledge Info | Press [ENTER] ' typed </dev/tty
multihdstart multihdstart
} }

View File

@@ -60,7 +60,7 @@ chk=$(figlet PTS - UI | lolcat )
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PTS UI 🚀 PTS UI
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$chk $chk
@@ -89,7 +89,7 @@ status=$(cat /var/plexguide/varken/api.check)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PTS-Varken -EDITION 🚀 PTS-Varken -EDITION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] MaxmInd API [ $status ] [1] MaxmInd API [ $status ]
@@ -122,4 +122,4 @@ EOF
} }
########################################## ##########################################
base base
api api

View File

@@ -22,7 +22,7 @@ question1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 $program - Set subdomains & ports $program - Set subdomains & ports
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -62,7 +62,7 @@ EOF
if [[ "$typed" == "A" || "$typed" == "a" ]]; then if [[ "$typed" == "A" || "$typed" == "a" ]]; then
exit exit
elif [ "$typed" == "1" ]; then elif [ "$typed" == "1" ]; then
read -p "↘️ Type subdomain to use for $program | Press [ENTER]: " typed </dev/tty read -p "🌍 Type subdomain to use for $program | Press [ENTER]: " typed </dev/tty
if [[ "$typed" == "" ]]; then if [[ "$typed" == "" ]]; then
badinput1 badinput1
@@ -75,7 +75,7 @@ EOF
fi fi
fi fi
elif [ "$typed" == "2" ]; then elif [ "$typed" == "2" ]; then
read -p "↘️ Type port 1025-65535 to use for $program | blank for default | Press [ENTER]: " typed </dev/tty read -p "🌍 Type port 1025-65535 to use for $program | blank for default | Press [ENTER]: " typed </dev/tty
if [[ "$typed" == "" ]]; then if [[ "$typed" == "" ]]; then
echo "" >"/var/plexguide/$program.port" echo "" >"/var/plexguide/$program.port"
else else

View File

@@ -7,214 +7,216 @@
################################################################################ ################################################################################
# FUNCTIONS START ############################################################## # FUNCTIONS START ##############################################################
typed="${typed,,}"
source /opt/plexguide/menu/functions/functions.sh source /opt/plexguide/menu/functions/functions.sh
queued() { queued() {
echo echo
read -p " ERROR - ${typed} is already queued! | Press [ENTER] " typed </dev/tty read -p " ERROR - $typed already queued! | Press [ENTER] " typed </dev/tty
question1 question1
} }
value() { value() {
bash /opt/plexguide/menu/pgbox/value.sh bash /opt/plexguide/menu/pgbox/value.sh
} }
exists() { exists() {
echo "" echo ""
echo " ERROR - ${typed} is already installed!" echo " ERROR - $typed already installed!"
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
part1 part1
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
question1 question1
else exists; fi else exists; fi
} }
badinputcom() { badinputcom() {
echo "" echo ""
echo " ERROR - Bad input! ${typed} not exist" echo " ERROR - Bad Input! $typed not exist"
echo "" echo ""
read -p 'PRESS [ENTER] ' typed </dev/tty read -p 'PRESS [ENTER] ' typed </dev/tty
} }
cronexe() { cronexe() {
croncheck=$(cat /opt/communityapps/apps/_cron.list | grep -c "\<$p\>") croncheck=$(cat /opt/communityapps/apps/_cron.list | grep -c "\<$p\>")
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
} }
cronmass() { cronmass() {
croncheck=$(cat /opt/communityapps/apps/_cron.list | grep -c "\<$p\>") croncheck=$(cat /opt/communityapps/apps/_cron.list | grep -c "\<$p\>")
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
} }
initial() { initial() {
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1 rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1 rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1 rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1 rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
touch /var/plexguide/pgbox.output touch /var/plexguide/pgbox.output
touch /var/plexguide/program.temp touch /var/plexguide/program.temp
touch /var/plexguide/app.list touch /var/plexguide/app.list
touch /var/plexguide/pgbox.buildup touch /var/plexguide/pgbox.buildup
folder && ansible-playbook /opt/plexguide/menu/pgbox/community/community.yml >/dev/null 2>&1 folder && ansible-playbook /opt/plexguide/menu/pgbox/community/community.yml >/dev/null 2>&1
file="/opt/communityapps/place.holder" file="/opt/communityapps/place.holder"
waitvar=0 waitvar=0
while [ "$waitvar" == "0" ]; do while [ "$waitvar" == "0" ]; do
sleep .5 sleep .5
if [ -e "$file" ]; then waitvar=1; fi if [ -e "$file" ]; then waitvar=1; fi
done done
apt-get install dos2unix -yqq apt-get install dos2unix -yqq
dos2unix /opt/communityapps/apps/image/_image.sh >/dev/null 2>&1 dos2unix /opt/communityapps/apps/image/_image.sh >/dev/null 2>&1
dos2unix /opt/communityapps/apps/_appsgen.sh >/dev/null 2>&1 dos2unix /opt/communityapps/apps/_appsgen.sh >/dev/null 2>&1
} }
question1() { question1() {
typed="${typed,,}"
### Remove Running Apps ### Remove Running Apps
while read p; do while read p; do
sed -i "/^$p\b/Id" /var/plexguide/app.list sed -i "/^$p\b/Id" /var/plexguide/app.list
done </var/plexguide/pgbox.running done </var/plexguide/pgbox.running
cp /var/plexguide/app.list /var/plexguide/app.list2 cp /var/plexguide/app.list /var/plexguide/app.list2
file="/var/plexguide/community.app" file="/var/plexguide/community.app"
#if [ ! -e "$file" ]; then #if [ ! -e "$file" ]; then
ls -la /opt/communityapps/apps | sed -e 's/.yml//g' | ls -la /opt/communityapps/apps | sed -e 's/.yml//g' |
awk '{print $9}' | tail -n +4 >/var/plexguide/app.list awk '{print $9}' | tail -n +4 >/var/plexguide/app.list
while read p; do while read p; do
echo "" >>/opt/communityapps/apps/$p.yml echo "" >>/opt/communityapps/apps/$p.yml
echo "##PG-Community" >>/opt/communityapps/apps/$p.yml echo "##PG-Community" >>/opt/communityapps/apps/$p.yml
mkdir -p /opt/mycontainers mkdir -p /opt/mycontainers
touch /opt/appdata/plexguide/rclone.conf touch /opt/appdata/plexguide/rclone.conf
done </var/plexguide/app.list done </var/plexguide/app.list
touch /var/plexguide/community.app touch /var/plexguide/community.app
#fi #fi
#bash /opt/communityapps/apps/_appsgen.sh #bash /opt/communityapps/apps/_appsgen.sh
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
### Remove Official Apps ### Remove Official Apps
while read p; do while read p; do
# reminder, need one for custom apps # reminder, need one for custom apps
baseline=$(cat /opt/communityapps/apps/$p.yml | grep "##PG-Community") baseline=$(cat /opt/communityapps/apps/$p.yml | grep "##PG-Community")
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
done </var/plexguide/app.list done </var/plexguide/app.list
### Blank Out Temp List ### Blank Out Temp List
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
### List Out Apps In Readable Order (One's Not Installed) ### List Out Apps In Readable Order (One's Not Installed)
sed -i -e "/templates/d" /var/plexguide/app.list sed -i -e "/templates/d" /var/plexguide/app.list
sed -i -e "/image/d" /var/plexguide/app.list sed -i -e "/image/d" /var/plexguide/app.list
sed -i -e "/_/d" /var/plexguide/app.list sed -i -e "/_/d" /var/plexguide/app.list
num=0 num=0
while read p; do while read p; do
echo -n $p >>/var/plexguide/program.temp echo -n $p >>/var/plexguide/program.temp
echo -n " " >>/var/plexguide/program.temp echo -n " " >>/var/plexguide/program.temp
num=$((num + 1)) num=$((num + 1))
if [[ "$num" == "7" ]]; then if [[ "$num" == "7" ]]; then
num=0 num=0
echo " " >>/var/plexguide/program.temp echo " " >>/var/plexguide/program.temp
fi fi
done </var/plexguide/app.list done </var/plexguide/app.list
notrun=$(cat /var/plexguide/program.temp) notrun=$(cat /var/plexguide/program.temp)
buildup=$(cat /var/plexguide/pgbox.output) buildup=$(cat /var/plexguide/pgbox.output)
if [ "$buildup" == "" ]; then buildup="NONE"; fi if [ "$buildup" == "" ]; then buildup="NONE"; fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💼 Multi-App Installer Community Apps 🚀 Multi-App Installer | Community APPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential apps to install 📂 Potential Apps to Install
$notrun $notrun
-------------------------------------------------------------------------
💾 Apps below are queued for installation 💾 Apps Queued for Installation
$buildup $buildup
_________________________________________________________________________
[A] Install [Z] Exit [A] Install
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '💬 Type an app to queue for install | Press [ENTER]: ' typed </dev/tty read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then question2; fi if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then exit; fi
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>") current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
if [ "$current" != "" ]; then queued && question1 ; fi if [ "$current" != "" ]; then queued && question1 ; fi
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>") current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
if [ "$current" != "" ]; then exists && question1 ; fi if [ "$current" != "" ]; then exists && question1 ; fi
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>") current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
if [ "$current" == "" ]; then badinputcom && question1 ; fi if [ "$current" == "" ]; then badinputcom && question1 ; fi
part1 part1
} }
part1() { part1() {
echo "$typed" >>/var/plexguide/pgbox.buildup echo "$typed" >>/var/plexguide/pgbox.buildup
num=0 num=0
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
while read p; do while read p; do
echo -n $p >>/var/plexguide/pgbox.output echo -n $p >>/var/plexguide/pgbox.output
echo -n " " >>/var/plexguide/pgbox.output echo -n " " >>/var/plexguide/pgbox.output
if [[ "$num" == 7 ]]; then if [[ "$num" == 7 ]]; then
num=0 num=0
echo " " >>/var/plexguide/pgbox.output echo " " >>/var/plexguide/pgbox.output
fi fi
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
sed -i "/^$typed\b/Id" /var/plexguide/app.list sed -i "/^$typed\b/Id" /var/plexguide/app.list
question1 question1
} }
final() { final() {
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
echo echo
exit exit
} }
question2() { question2() {
# Image Selector # Image Selector
image=off image=off
while read p; do while read p; do
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
bash /opt/communityapps/apps/image/_image.sh bash /opt/communityapps/apps/image/_image.sh
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
# Cron Execution # Cron Execution
edition=$(cat /var/plexguide/pg.edition) edition=$(cat /var/plexguide/pg.edition)
if [[ "$edition" == "PG Edition - HD Solo" ]]; then if [[ "$edition" == "PG Edition - HD Solo" ]]; then
a=b a=b
else else
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup) croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
echo "false" >/var/plexguide/cron.count echo "false" >/var/plexguide/cron.count
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
fi fi
# CName & Port Execution # CName & Port Execution
bash /opt/plexguide/menu/pgbox/cname.sh bash /opt/plexguide/menu/pgbox/cname.sh
while read p; do while read p; do
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -222,37 +224,37 @@ $p - Now Installing!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
##### CHECK START ##### ##### CHECK START #####
value value
##### CHECK EXIT ##### ##### CHECK EXIT #####
# Store Used Program # Store Used Program
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
# Execute Main Program # Execute Main Program
ansible-playbook /opt/communityapps/apps/$p.yml ansible-playbook /opt/communityapps/apps/$p.yml
if [[ "$edition" == "PG Edition - HD Solo" ]]; then if [[ "$edition" == "PG Edition - HD Solo" ]]; then
a=b a=b
elif [ "$croncount" -eq "1" ]; then cronexe; fi elif [ "$croncount" -eq "1" ]; then cronexe; fi
# End Banner # End Banner
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
sleep 2 sleep 2
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
echo "" >>/tmp/output.info echo "" >>/tmp/output.info
cat /tmp/output.info cat /tmp/output.info
final final
} }
start() { start() {
initial initial
question1 question1
} }
folder() { folder() {
mkdir -p /opt/communityapps mkdir -p /opt/communityapps
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################

View File

@@ -13,7 +13,7 @@
- name: Cloning Community Apps - name: Cloning Community Apps
git: git:
repo: 'https://github.com/Pandaura/Apps-Community' repo: 'https://github.com/MHA-Team/Apps-Community'
dest: /opt/communityapps dest: /opt/communityapps
version: 'master' version: 'master'
force: yes force: yes

View File

@@ -1,259 +1,249 @@
#!/bin/bash #!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################ ################################################################################
# FUNCTIONS START ############################################################## # FUNCTIONS START ##############################################################
source /opt/plexguide/menu/functions/functions.sh source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/start.sh
typed="${typed,,}"
queued() { queued() {
echo echo
read -p "⛔️ ERROR - $typed is already queued! | Press [ENTER] " typed </dev/tty read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
question1 question1
} }
value() { value() {
bash /opt/plexguide/menu/pgbox/value.sh bash /opt/plexguide/menu/pgbox/value.sh
} }
exists() { exists() {
echo "" echo ""
echo "⛔️ ERROR - $typed is already installed!" echo "⛔️ ERROR - $typed Already Installed!"
read -p "⚠️ Would you like to reinstall $typed? [Y/N] | Press [ENTER] " foo </dev/tty read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
part1 part1
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
question1 question1
else exists; fi else exists; fi
} }
badinputcore() { badinputcore() {
echo "" echo ""
echo "⛔️ ERROR - Bad input! $typed not exist" echo "⛔️ ERROR - Bad Input! $typed not exist"
echo "" echo ""
read -p 'PRESS [ENTER] ' typed </dev/tty read -p 'PRESS [ENTER] ' typed </dev/tty
} }
cronexe() { cronexe() {
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>") croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
} }
cronmass() { cronmass() {
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>") croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
} }
initial() { initial() {
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1 rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1 rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1 rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1 rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
touch /var/plexguide/pgbox.output touch /var/plexguide/pgbox.output
touch /var/plexguide/program.temp touch /var/plexguide/program.temp
touch /var/plexguide/app.list touch /var/plexguide/app.list
touch /var/plexguide/pgbox.buildup touch /var/plexguide/pgbox.buildup
folder && ansible-playbook /opt/plexguide/menu/pgbox/core/core.yml >/dev/null 2>&1 folder && ansible-playbook /opt/plexguide/menu/pgbox/core/core.yml >/dev/null 2>&1
file="/opt/coreapps/place.holder" file="/opt/coreapps/place.holder"
waitvar=0 waitvar=0
while [ "$waitvar" == "0" ]; do while [ "$waitvar" == "0" ]; do
sleep .5 sleep .5
if [ -e "$file" ]; then waitvar=1; fi if [ -e "$file" ]; then waitvar=1; fi
done done
apt-get install dos2unix -yqq apt-get install dos2unix -yqq
dos2unix /opt/coreapps/apps/image/_image.sh >/dev/null 2>&1 dos2unix /opt/coreapps/apps/image/_image.sh >/dev/null 2>&1
dos2unix /opt/coreapps/apps/_appsgen.sh >/dev/null 2>&1 dos2unix /opt/coreapps/apps/_appsgen.sh >/dev/null 2>&1
} }
question1() { question1() {
typed="${typed,,}"
### Remove Running Apps ### Remove Running Apps
while read p; do while read p; do
sed -i "/^$p\b/Id" /var/plexguide/app.list sed -i "/^$p\b/Id" /var/plexguide/app.list
done </var/plexguide/pgbox.running done </var/plexguide/pgbox.running
cp /var/plexguide/app.list /var/plexguide/app.list2 cp /var/plexguide/app.list /var/plexguide/app.list2
file="/var/plexguide/core.app" file="/var/plexguide/core.app"
#if [ ! -e "$file" ]; then #if [ ! -e "$file" ]; then
ls -la /opt/coreapps/apps | sed -e 's/.yml//g' | ls -la /opt/coreapps/apps | sed -e 's/.yml//g' |
awk '{print $9}' | tail -n +4 >/var/plexguide/app.list awk '{print $9}' | tail -n +4 >/var/plexguide/app.list
while read p; do while read p; do
echo "" >>/opt/coreapps/apps/$p.yml echo "" >>/opt/coreapps/apps/$p.yml
echo "##PG-Core" >>/opt/coreapps/apps/$p.yml echo "##PG-Core" >>/opt/coreapps/apps/$p.yml
mkdir -p /opt/mycontainers mkdir -p /opt/mycontainers
touch /opt/appdata/plexguide/rclone.conf touch /opt/appdata/plexguide/rclone.conf
done </var/plexguide/app.list done </var/plexguide/app.list
touch /var/plexguide/core.app touch /var/plexguide/core.app
#fi #fi
#bash /opt/coreapps/apps/_appsgen.sh #bash /opt/coreapps/apps/_appsgen.sh
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
### Remove Official Apps ### Remove Official Apps
while read p; do while read p; do
# reminder, need one for custom apps # reminder, need one for custom apps
baseline=$(cat /opt/coreapps/apps/$p.yml | grep "##PG-Core") baseline=$(cat /opt/coreapps/apps/$p.yml | grep "##PG-Core")
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
done </var/plexguide/app.list done </var/plexguide/app.list
### Blank Out Temp List ### Blank Out Temp List
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
### List Out Apps In Readable Order (One's Not Installed) ### List Out Apps In Readable Order (One's Not Installed)
declare NF='\033[1;32m' num=0
declare NC='\033[0m' sed -i -e "/templates/d" /var/plexguide/app.list
tempfile='/var/plexguide/program.temp' sed -i -e "/image/d" /var/plexguide/app.list
pgboxinstalled=$(docker ps --format '{{.Names}}') sed -i -e "/watchtower/d" /var/plexguide/app.list
num=0 sed -i -e "/_/d" /var/plexguide/app.list
sed -i -e "/templates/d" /var/plexguide/app.list while read p; do
sed -i -e "/image/d" /var/plexguide/app.list echo -n $p >>/var/plexguide/program.temp
sed -i -e "/watchtower/d" /var/plexguide/app.list echo -n " " >>/var/plexguide/program.temp
sed -i -e "/_/d" /var/plexguide/app.list num=$((num + 1))
while read p; do if [[ "$num" == "7" ]]; then
installed=false #boolean num=0
for app in $pgboxinstalled echo " " >>/var/plexguide/program.temp
do fi
if [ "$p" == "$app" ]; then done </var/plexguide/app.list
installed=true
fi notrun=$(cat /var/plexguide/program.temp)
done buildup=$(cat /var/plexguide/pgbox.output)
if [ $installed == true ]; then
echo -n "$(echo -e ${NF}$p${NC})" >>$tempfile if [ "$buildup" == "" ]; then buildup="NONE"; fi
else
echo -n $p >>$tempfile
fi
echo -n " " >>$tempfile
num=$((num + 1))
if [[ "$num" == "7" ]]; then
num=0
echo " " >>$tempfile
fi
done </var/plexguide/app.list
notrun=$(cat $tempfile)
buildup=$(cat /var/plexguide/pgbox.output)
if [ "$buildup" == "" ]; then buildup="NONE"; fi # make this tidy by removing from list once added
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💼 Multi-App Installer Core Apps 🚀 Multi-App Installer | Core Edition
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential apps to install - Installed apps will be $(echo -e ${NF}GREEN${NC}) 📂 Potential Apps to Install
$notrun $notrun
-------------------------------------------------------------------------
💾 Apps below are queued for installation 💾 Apps Queued for Installation
$buildup $buildup
_________________________________________________________________________
[A] Install [A] Install
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
end_menu read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
read -p '💬 Type an app to queue for install | Press [ENTER]: ' typed </dev/tty #convert to lowercase all the fucking time
if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; fi
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then question2; fi
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then exit; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>") if [ "$current" != "" ]; then queued && question1; fi
if [ "$current" != "" ]; then queued && question1; fi
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>") if [ "$current" != "" ]; then exists && question1; fi
if [ "$current" != "" ]; then exists && question1; fi
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>") if [ "$current" == "" ]; then badinputcore && question1; fi
if [ "$current" == "" ]; then badinputcore && question1; fi
part1
part1
} }
part1() { part1() {
echo "$typed" >>/var/plexguide/pgbox.buildup echo "$typed" >>/var/plexguide/pgbox.buildup
num=0 num=0
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
while read p; do while read p; do
echo -n $p >>/var/plexguide/pgbox.output echo -n $p >>/var/plexguide/pgbox.output
echo -n " " >>/var/plexguide/pgbox.output echo -n " " >>/var/plexguide/pgbox.output
if [[ "$num" == 7 ]]; then if [[ "$num" == 7 ]]; then
num=0 num=0
echo " " >>/var/plexguide/pgbox.output echo " " >>/var/plexguide/pgbox.output
fi fi
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
sed -i "/^$typed\b/Id" /var/plexguide/app.list sed -i "/^$typed\b/Id" /var/plexguide/app.list
question1 question1
} }
final() { final() {
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
echo echo
exit exit
} }
question2() { question2() {
# Image Selector # Image Selector
image=off image=off
while read p; do while read p; do
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
bash /opt/coreapps/apps/image/_image.sh bash /opt/coreapps/apps/image/_image.sh
# CName & Port Execution # CName & Port Execution
bash /opt/plexguide/menu/pgbox/cname.sh bash /opt/plexguide/menu/pgbox/cname.sh
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
# Cron Execution # Cron Execution
edition=$(cat /var/plexguide/pg.edition) edition=$(cat /var/plexguide/pg.edition)
if [[ "$edition" == "PG Edition - HD Solo" ]]; then if [[ "$edition" == "PG Edition - HD Solo" ]]; then
a=b a=b
else else
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup) croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
echo "false" >/var/plexguide/cron.count echo "false" >/var/plexguide/cron.count
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
fi fi
while read p; do while read p; do
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$p - Is now installing... $p - Now Installing!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1 sleep 1
value value
# Store Used Program # Store Used Program
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
# Execute Main Program # Execute Main Program
ansible-playbook /opt/coreapps/apps/$p.yml ansible-playbook /opt/coreapps/apps/$p.yml
if [[ "$edition" == "PG Edition - HD Solo" ]]; then if [[ "$edition" == "PG Edition - HD Solo" ]]; then
a=b a=b
elif [ "$croncount" -eq "1" ]; then cronexe; fi elif [ "$croncount" -eq "1" ]; then cronexe; fi
# End Banner # End Banner
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
sleep 2 sleep 2
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
echo "" >>/tmp/output.info echo "" >>/tmp/output.info
cat /tmp/output.info cat /tmp/output.info
final final
} }
@@ -264,16 +254,10 @@ start() {
} }
folder() { folder() {
mkdir -p /opt/coreapps mkdir -p /opt/coreapps
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################
# replaces line 279 of:
# https://github.com/Pandaura/PTS-Team/blob/687c31fc6b2c8722b57515181f1f28b75f0629df/menu/pgbox/core/core.sh#L279
# only execute the start funtion if this script it called directly and but not when sourced.
# this has been done, as question2 funtion is reused by the pts script for direct app(s) installation
# e.g pts install radarr will utilize question2 funtion while skipping the start part.
echo "" >/tmp/output.info echo "" >/tmp/output.info
start start

View File

@@ -13,7 +13,7 @@
- name: Cloning Core Apps - name: Cloning Core Apps
git: git:
repo: 'https://github.com/Pandaura/Apps-Core' repo: 'https://github.com/MHA-Team/Apps-Core'
dest: /opt/coreapps dest: /opt/coreapps
version: 'master' version: 'master'
force: yes force: yes

View File

@@ -1,79 +0,0 @@
#!/bin/bash
IFS=$'\n'
# File name or path
APPS_FILE="/var/plexguide/app.list"
# Read file as array
apps=($(cat "$APPS_FILE"))
length=$((${#apps[@]} - 1))
index=0
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
function print_list() {
local count=0
clear
for i in ${apps[@]}; do
if [[ $count -ne $index ]]; then
echo -e "${RED}${i}"
else
echo -e "${GREEN}${i}"
fi
((count++))
done
echo -ne "${NC}"
}
function your_code_here() {
local app=$*
echo "Your selected app: ${app} "
}
function select_app() {
while read -sN1 key >/dev/null; do
# catch multi-char special key sequences
read -sN1 -t 0.0001 k1
read -sN1 -t 0.0001 k2
read -sN1 -t 0.0001 k3
key+=${k1}${k2}${k3}
case "$key" in
$'\e[A' | $'\e0A' | $'\e[D' | $'\e0D') # cursor up, left: previous item
if [[ $index -gt 0 ]]; then
((index--))
fi
;;
$'\e[B' | $'\e0B' | $'\e[C' | $'\e0C') # cursor down, right: next item
if [[ $index -lt $length ]]; then
((index++))
fi
;;
$'\e[1~' | $'\e0H' | $'\e[H') # home: first item
index=0
;;
$'\e[4~' | $'\e0F' | $'\e[F') # end: last item
index=$length
;;
' ') # space: mark/unmark item
your_code_here "${apps[index]}"
return 0
;;
q | '') # q, carriage return: quit
return 0 ;;
esac
print_list
done
}
print_list
select_app

View File

@@ -1,185 +1,23 @@
#!/bin/bash #!/bin/bash
# #
# Title: PGBlitz (Reference Title File) # Title: MHA-Team
# Author(s): Admin9705 - Deiteq # Author(s): iDoMnCi
# URL: https://pgblitz.com - http://github.pgblitz.com # URL: https://github.com/MHA-Team/MHA-Team
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
typed="${typed,,}"
program=$(cat /tmp/program_var)
cname=$program
if [[ -f "/var/plexguide/$program.cname" ]]; then # FUNCTIONS START ##############################################################
cname=$(cat /var/plexguide/$program.cname) source /opt/plexguide/menu/functions/functions.sh
fi
domain=$(cat /var/plexguide/server.domain) queued() {
port=$(cat /tmp/program_port) echo
ip=$(cat /var/plexguide/server.ip) read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
ports=$(cat /var/plexguide/server.ports) appselect
hdpath=$(cat /var/plexguide/server.hd.path)
if [ "$program" == "plex" ]; then extra="/web"; else extra=""; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Access Configuration Info
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
tee <<-EOF
▫ $program:${port} <- Use this as the url when connecting another app to $program.
EOF
if [ "$ports" == "" ]; then
tee <<-EOF
▫ $ip:${port}${extra}
EOF
fi
if [ "$domain" != "NOT-SET" ]; then
if [ "$ports" == "" ]; then
tee <<-EOF
▫ $domain:${port}${extra}
EOF
fi
tee <<-EOF
▫ $cname.$domain${extra}
EOF
fi
if [ "$program" == "plex" ]; then
tee <<-EOF
First Time Plex Claim Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
if [ "$domain" != "NOT-SET" ]; then
tee <<-EOF
▫ http://plex.${domain}:32400 <-- Use http; not https
EOF
fi
tee <<-EOF
▫ $ip:${port}${extra}
EOF
fi
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Manual Configuration Required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$program requires additional manual configuration!
EOF
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]] || [[ "$program" == *"qbittorrent"* ]]; then
tee <<-EOF
$program requires "downloader mappings" to enable hardlinking and rapid importing.
If you do not have these mappings, $program can't rename and move the files on import.
This will result in files being copied instead of moved, and it will cause other issues.
The mappings are on the download client settings (advanced setting), at the bottom of the page.
Visit https://github.com/Pandaura/PTS-Team/wiki/Remote-Path-Mappings for more information.
EOF
fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Failure to perform manual configuration changes will cause problems!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌍 Visit the wiki for instructions on how to configure $program.
https://github.com/Pandaura/PTS-Team/wiki/$program
EOF
fi
####--------
if [[ "$program" == *"sabnzbd"* ]] || [[ "$program" == *"nzbget"* ]] ; then
cclean=$(cat /var/plexguide/cloneclean)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 NOTE / INFO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
for incomplete downloads $program used the folder $hdpath/incomplete/nzb
for finished downloads $program used the folder $hdpath/downloads/nzb
beware the cloneclean is set to $cclean min
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [[ "$program" == *"sabnzbd"* ]] ; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 sabnzbd api_key = $sbakey
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [[ "$program" == *"rutorrent"* ]] || [[ "$program" == *"qbittorrent"* ]] || [[ "$program" == *"deluge"* ]]; then
cclean=$(cat /var/plexguide/cloneclean)
tclean=$(($cclean*2))
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 NOTE / INFO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
for incomplete downloads $program used the folder $hdpath/incomplete/torrent
for finished downloads $program used the folder $hdpath/downloads/torrent
beware the cloneclean is set to $tclean min
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [ "$program" == "plex" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Manual Configuration Required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
we prefer using plex_autoscan, unlike other alternatives,
that does not put a lot of pressure on the API of your Google Account.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [ "$hdpath" != "/mnt" ]; then
sbakey=$(cat /opt/appdata/sabnzbd/sabnzbd.ini | grep "api_key" | head -n 1 | awk '{print $3}')
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You must add /mnt self to the docker container again
Your $hdpath is not /mnt
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
} }
badinput() { badinput() {
echo "" echo ""
echo " ERROR - Bad Input! $typed not exist" echo " ERROR - Bad Input! $typed not exist"
echo "" echo ""
read -p 'PRESS [ENTER] ' typed </dev/tty read -p 'PRESS [ENTER] ' typed </dev/tty
} }
@@ -239,7 +77,7 @@ appselect() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Multi-App Auto Updater 🚀 Multi-App Auto Updater
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential Apps to Auto Update 📂 Potential Apps to Auto Update
@@ -259,9 +97,9 @@ $buildup
EOF EOF
read -p '↪️ Type App Name to Queue Auto Updating | Type ALL to select all | Press [ENTER]: ' typed </dev/tty read -p '↪️ Type App Name to Queue Auto Updating | Type ALL to select all | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then start; fi if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then exit; fi
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>") current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
if [ "$current" != "" ]; then queued && appselect; fi if [ "$current" != "" ]; then queued && appselect; fi
@@ -303,6 +141,19 @@ complete() {
exit exit
} }
question2() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rebuilding Ouroboros!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
ansible-playbook /opt/plexguide/menu/functions/ouroboros.yml
complete
}
start() { start() {
startup startup
appselect appselect

View File

@@ -1,14 +1,13 @@
#!/bin/bash #!/bin/bash
channelsdvr() { channelsdvr() {
typed="${typed,,}" hdpath=$(cat /var/plexguide/server.hd.path)
hdpath=$(cat /var/plexguide/server.hd.path)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📁 Channels-DVR local Path 📁 Channels-DVR local Path
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: In order for this to work, you must set the PATH NOTE: In order for this to work, you must set the PATH
to where Channels-DVR can save the local files. to where Channels-DVR can save the local files.
Possible folder Possible folder
@@ -21,47 +20,47 @@ $hdpath/dvrfolder
Go Back? Type > exit Go Back? Type > exit
EOF EOF
read -p '↘️ Type channelsdvr local Location | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type channelsdvr local Location | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
exit 0 exit 0
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking Path $typed 🚀 SYSTEM MESSAGE: Checking Path $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1.5 sleep 1.5
##################################################### TYPED CHECKERS - START ##################################################### TYPED CHECKERS - START
typed2=$typed typed2=$typed
bonehead=no bonehead=no
##### If user forgot to add a / in the beginning, we fix for them ##### If user forgot to add a / in the beginning, we fix for them
initial="$(echo $typed | head -c 1)" initial="$(echo $typed | head -c 1)"
if [ "$initial" != "/" ]; then if [ "$initial" != "/" ]; then
typed="/$typed" typed="/$typed"
fi fi
##### If user added a / at the end, we fix for them ##### If user added a / at the end, we fix for them
initial="${typed: -1}" initial="${typed: -1}"
if [ "$initial" == "/" ]; then if [ "$initial" == "/" ]; then
typed=${typed::-1} typed=${typed::-1}
fi fi
##################################################### TYPED CHECKERS - START ##################################################### TYPED CHECKERS - START
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking if Location is Valid 🚀 SYSTEM MESSAGE: Checking if Location is Valid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1.5 sleep 1.5
mkdir $typed/test 1>/dev/null 2>&1 mkdir $typed/test 1>/dev/null 2>&1
file="$typed/test" file="$typed/test"
if [ -e "$file" ]; then if [ -e "$file" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -69,29 +68,30 @@ EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
### Removes /mnt if /mnt/unionfs exists ### Removes /mnt if /mnt/unionfs exists
#check=$(echo $typed | head -c 12) #check=$(echo $typed | head -c 12)
#if [ "$check" == "/mnt/unionfs" ]; then #if [ "$check" == "/mnt/unionfs" ]; then
#typed=${typed:4} #typed=${typed:4}
#fi #fi
echo "$typed" >/var/plexguide/channelsdvr.folder echo "$typed" >/var/plexguide/channelsdvr.folder
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔ ALERT: Path $typed DOES NOT Exist! ⛔ ALERT: Path $typed DOES NOT Exist!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Note: You must ensure that linux is able to READ your location. Note: You must ensure that linux is able to READ your location.
It's start again for you
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
channelsdvr channelsdvr
fi
fi fi
fi
} }
channelsdvr channelsdvr

View File

@@ -1,8 +1,8 @@
#/bin/bash #/bin/bash
###plaxt.sh ###plaxt.sh
api() { api() {
typed="${typed,,}"
domain=$(cat /var/plexguide/server.domain) domain=$(cat /var/plexguide/server.domain)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -24,28 +24,28 @@ Go Back? Type > exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty
echo $typed >/var/plexguide/trakt.id echo $typed >/var/plexguide/trakt.id
read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty
echo $typed >/var/plexguide/trakt.sec echo $typed >/var/plexguide/trakt.sec
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
exit 0 exit 0
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ SYSTEM MESSAGE: Traktarr API Notice ✅ SYSTEM MESSAGE: Traktarr API Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: The API Client and Secret is set! NOTE: The API Client and Secret is set!
INFO: Messed up? Rerun this API Interface to update the information! INFO: Messed up? Rerun this API Interface to update the information!
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi fi
} }
api api

View File

@@ -1,25 +1,25 @@
#/bin/bash #/bin/bash
####rcwebui.sh ####rcwebui.sh
start0() { start0() {
folder && rcwebui folder && rcwebui
} }
folder() { folder() {
if [[ ! -e "/var/plexguide/rcwebui" ]]; then if [[ ! -e "/var/plexguide/rcwebui" ]]; then
remove remove
else create; fi else create; fi
} }
remove() { remove() {
rm -rf /var/plexguide/rcwebui rm -rf /var/plexguide/rcwebui
mkdir -p /var/plexguide/rcwebui mkdir -p /var/plexguide/rcwebui
echo "NOT-SET" >/var/plexguide/rcwebui/rcuser.user echo "NOT-SET" >/var/plexguide/rcwebui/rcuser.user
echo "NOT-SET" >/var/plexguide/rcwebui/rcpass.pass echo "NOT-SET" >/var/plexguide/rcwebui/rcpass.pass
} }
create() { create() {
mkdir -p /var/plexguide/rcwebui mkdir -p /var/plexguide/rcwebui
echo "NOT-SET" >/var/plexguide/rcwebui/rcuser.user echo "NOT-SET" >/var/plexguide/rcwebui/rcuser.user
echo "NOT-SET" >/var/plexguide/rcwebui/rcpass.pass echo "NOT-SET" >/var/plexguide/rcwebui/rcpass.pass
} }
rcwebui() { rcwebui() {
@@ -37,13 +37,13 @@ Go Back? Type > exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Username | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Username | Press [ENTER]: ' typed </dev/tty
echo $typed >/var/plexguide/rcwebui/rcuser.user echo $typed >/var/plexguide/rcwebui/rcuser.user
read -p '↘️ Type Password | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Password | Press [ENTER]: ' typed </dev/tty
echo $typed >/var/plexguide/rcwebui/rcpass.pass echo $typed >/var/plexguide/rcwebui/rcpass.pass
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
exit 0 exit 0
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -55,8 +55,8 @@ Password : $(cat /var/plexguide/rcwebui/rcpass.pass)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi fi
} }
start0 start0

View File

@@ -9,7 +9,7 @@ program=$(cat /tmp/program_var)
cname=$program cname=$program
if [[ -f "/var/plexguide/$program.cname" ]]; then if [[ -f "/var/plexguide/$program.cname" ]]; then
cname=$(cat /var/plexguide/$program.cname) cname=$(cat /var/plexguide/$program.cname)
fi fi
domain=$(cat /var/plexguide/server.domain) domain=$(cat /var/plexguide/server.domain)
@@ -25,168 +25,7 @@ if [ "$program" == "plex" ]; then extra="/web"; else extra=""; fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Access Configuration Info 🌎 Access Configuration Info
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
tee <<-EOF
▫ $program:${port} <- Use this as the url when connecting another app to $program.
EOF
if [ "$ports" == "" ]; then
tee <<-EOF
▫ $ip:${port}${extra}
EOF
fi
if [ "$domain" != "NOT-SET" ]; then
if [ "$ports" == "" ]; then
tee <<-EOF
▫ $domain:${port}${extra}
EOF
fi
tee <<-EOF
▫ $cname.$domain${extra}
EOF
fi
if [ "$program" == "plex" ]; then
tee <<-EOF
First Time Plex Claim Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
if [ "$domain" != "NOT-SET" ]; then
tee <<-EOF
▫ http://plex.${domain}:32400 <-- Use http; not https
EOF
fi
tee <<-EOF
▫ $ip:${port}${extra}
EOF
fi
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Manual Configuration Required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$program requires additional manual configuration!
EOF
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]] || [[ "$program" == *"qbittorrent"* ]]; then
tee <<-EOF
$program requires "downloader mappings" to enable hardlinking and rapid importing.
If you do not have these mappings, $program can't rename and move the files on import.
This will result in files being copied instead of moved, and it will cause other issues.
The mappings are on the download client settings (advanced setting), at the bottom of the page.
Visit https://github.com/Pandaura/PTS-Team/wiki/Remote-Path-Mappings for more information.
EOF
fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Failure to perform manual configuration changes will cause problems!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌍 Visit the wiki for instructions on how to configure $program.
https://github.com/Pandaura/PTS-Team/wiki/$program
EOF
fi
####--------
if [[ "$program" == *"sabnzbd"* ]] || [[ "$program" == *"nzbget"* ]] ; then
cclean=$(cat /var/plexguide/cloneclean)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 NOTE / INFO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
for incomplete downloads $program used the folder $hdpath/incomplete/nzb
for finished downloads $program used the folder $hdpath/downloads/nzb
beware the cloneclean is set to $cclean min
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [[ "$program" == *"sabnzbd"* ]] ; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 sabnzbd api_key = $sbakey
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [[ "$program" == *"rutorrent"* ]] || [[ "$program" == *"qbittorrent"* ]] || [[ "$program" == *"deluge"* ]]; then
cclean=$(cat /var/plexguide/cloneclean)
tclean=$(($cclean*2))
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 NOTE / INFO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
for incomplete downloads $program used the folder $hdpath/incomplete/torrent
for finished downloads $program used the folder $hdpath/downloads/torrent
beware the cloneclean is set to $tclean min
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [ "$program" == "plex" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Manual Configuration Required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
we prefer using plex_autoscan, unlike other alternatives,
that does not put a lot of pressure on the API of your Google Account.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [ "$hdpath" != "/mnt" ]; then
sbakey=$(cat /opt/appdata/sabnzbd/sabnzbd.ini | grep "api_key" | head -n 1 | awk '{print $3}')
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You must add /mnt self to the docker container again
Your $hdpath is not /mnt
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
port=$(cat /tmp/program_port)
ip=$(cat /var/plexguide/server.ip)
ports=$(cat /var/plexguide/server.ports)
hdpath=$(cat /var/plexguide/server.hd.path)
if [ "$program" == "plex" ]; then extra="/web"; else extra=""; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Access configuration info
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -249,7 +88,7 @@ EOF
The mappings are on the download client settings (advanced setting), at the bottom of the page. The mappings are on the download client settings (advanced setting), at the bottom of the page.
Visit https://github.com/Pandaura/PTS-Team/wiki/Remote-Path-Mappings for more information. Visit https://github.com/MHA-Team/PTS-Team/wiki/Remote-Path-Mappings for more information.
EOF EOF
fi fi
@@ -260,7 +99,7 @@ EOF
🌍 Visit the wiki for instructions on how to configure $program. 🌍 Visit the wiki for instructions on how to configure $program.
https://github.com/Pandaura/PTS-Team/wiki/$program https://github.com/MHA-Team/PTS-Team/wiki/$program
EOF EOF
fi fi

View File

@@ -10,125 +10,125 @@
source /opt/plexguide/menu/functions/functions.sh source /opt/plexguide/menu/functions/functions.sh
queued() { queued() {
echo echo
read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
question1 question1
} }
exists() { exists() {
echo "" echo ""
echo " ERROR - $typed Already Installed!" echo " ERROR - $typed Already Installed!"
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
part1 part1
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
question1 question1
else exists; fi else exists; fi
} }
badinputgce() { badinputgce() {
echo "" echo ""
echo " ERROR - Bad Input! $typed not exist" echo " ERROR - Bad Input! $typed not exist"
echo "" echo ""
read -p 'PRESS [ENTER] ' typed </dev/tty read -p 'PRESS [ENTER] ' typed </dev/tty
} }
cronexe() { cronexe() {
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>") croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
} }
cronmass() { cronmass() {
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>") croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
} }
initial() { initial() {
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1 rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1 rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1 rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1 rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
touch /var/plexguide/pgbox.output touch /var/plexguide/pgbox.output
touch /var/plexguide/program.temp touch /var/plexguide/program.temp
touch /var/plexguide/app.list touch /var/plexguide/app.list
touch /var/plexguide/pgbox.buildup touch /var/plexguide/pgbox.buildup
folder && ansible-playbook /opt/plexguide/menu/pgbox/gce/gcecore.yml >/dev/null 2>&1 folder && ansible-playbook /opt/plexguide/menu/pgbox/gce/gcecore.yml >/dev/null 2>&1
file="/opt/coreapps/place.holder" file="/opt/coreapps/place.holder"
waitvar=0 waitvar=0
while [ "$waitvar" == "0" ]; do while [ "$waitvar" == "0" ]; do
sleep .5 sleep .5
if [ -e "$file" ]; then waitvar=1; fi if [ -e "$file" ]; then waitvar=1; fi
done done
apt-get install dos2unix -yqq apt-get install dos2unix -yqq
dos2unix /opt/coreapps/apps/image/_image.sh >/dev/null 2>&1 dos2unix /opt/coreapps/apps/image/_image.sh >/dev/null 2>&1
dos2unix /opt/coreapps/apps/_appsgen.sh >/dev/null 2>&1 dos2unix /opt/coreapps/apps/_appsgen.sh >/dev/null 2>&1
} }
question1() { question1() {
### Remove Running Apps ### Remove Running Apps
while read p; do while read p; do
sed -i "/^$p\b/Id" /var/plexguide/app.list sed -i "/^$p\b/Id" /var/plexguide/app.list
done </var/plexguide/pgbox.running done </var/plexguide/pgbox.running
cp /var/plexguide/app.list /var/plexguide/app.list2 cp /var/plexguide/app.list /var/plexguide/app.list2
file="/var/plexguide/core.app" file="/var/plexguide/core.app"
#if [ ! -e "$file" ]; then #if [ ! -e "$file" ]; then
ls -la /opt/coreapps/apps | sed -e 's/.yml//g' | ls -la /opt/coreapps/apps | sed -e 's/.yml//g' |
awk '{print $9}' | tail -n +4 >/var/plexguide/app.list awk '{print $9}' | tail -n +4 >/var/plexguide/app.list
while read p; do while read p; do
echo "" >>/opt/coreapps/apps/$p.yml echo "" >>/opt/coreapps/apps/$p.yml
echo "##PG-Core" >>/opt/coreapps/apps/$p.yml echo "##PG-Core" >>/opt/coreapps/apps/$p.yml
touch /opt/appdata/plexguide/rclone.conf touch /opt/appdata/plexguide/rclone.conf
done </var/plexguide/app.list done </var/plexguide/app.list
touch /var/plexguide/core.app touch /var/plexguide/core.app
#fi #fi
#bash /opt/coreapps/apps/_appsgen.sh #bash /opt/coreapps/apps/_appsgen.sh
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
### Remove Official Apps ### Remove Official Apps
while read p; do while read p; do
# reminder, need one for custom apps # reminder, need one for custom apps
baseline=$(cat /opt/coreapps/apps/$p.yml | grep "##PG-Core") baseline=$(cat /opt/coreapps/apps/$p.yml | grep "##PG-Core")
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
done </var/plexguide/app.list done </var/plexguide/app.list
### Blank Out Temp List ### Blank Out Temp List
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
### List Out Apps In Readable Order (One's Not Installed) ### List Out Apps In Readable Order (One's Not Installed)
num=0 num=0
sed -i -e "/templates/d" /var/plexguide/app.list sed -i -e "/templates/d" /var/plexguide/app.list
sed -i -e "/image/d" /var/plexguide/app.list sed -i -e "/image/d" /var/plexguide/app.list
sed -i -e "/watchtower/d" /var/plexguide/app.list sed -i -e "/watchtower/d" /var/plexguide/app.list
sed -i -e "/_/d" /var/plexguide/app.list sed -i -e "/_/d" /var/plexguide/app.list
sed -i -e "/plex/d" /var/plexguide/app.list sed -i -e "/plex/d" /var/plexguide/app.list
while read p; do while read p; do
echo -n $p >>/var/plexguide/program.temp echo -n $p >>/var/plexguide/program.temp
echo -n " " >>/var/plexguide/program.temp echo -n " " >>/var/plexguide/program.temp
num=$((num + 1)) num=$((num + 1))
if [[ "$num" == "7" ]]; then if [[ "$num" == "7" ]]; then
num=0 num=0
echo " " >>/var/plexguide/program.temp echo " " >>/var/plexguide/program.temp
fi fi
done </var/plexguide/app.list done </var/plexguide/app.list
notrun=$(cat /var/plexguide/program.temp) notrun=$(cat /var/plexguide/program.temp)
buildup=$(cat /var/plexguide/pgbox.output) buildup=$(cat /var/plexguide/pgbox.output)
if [ "$buildup" == "" ]; then buildup="NONE"; fi if [ "$buildup" == "" ]; then buildup="NONE"; fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Multi-App Installer | GCE Edition 🚀 Multi-App Installer | GCE Edition
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential Apps to Install 📂 Potential Apps to Install
@@ -146,75 +146,75 @@ $buildup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then question2; fi if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then exit; fi
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>") current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
if [ "$current" != "" ]; then queued && question1; fi if [ "$current" != "" ]; then queued && question1; fi
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>") current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
if [ "$current" != "" ]; then exists && question1; fi if [ "$current" != "" ]; then exists && question1; fi
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>") current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
if [ "$current" == "" ]; then badinputgce && question1; fi if [ "$current" == "" ]; then badinputgce && question1; fi
part1 part1
} }
part1() { part1() {
echo "$typed" >>/var/plexguide/pgbox.buildup echo "$typed" >>/var/plexguide/pgbox.buildup
num=0 num=0
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
while read p; do while read p; do
echo -n $p >>/var/plexguide/pgbox.output echo -n $p >>/var/plexguide/pgbox.output
echo -n " " >>/var/plexguide/pgbox.output echo -n " " >>/var/plexguide/pgbox.output
if [[ "$num" == 7 ]]; then if [[ "$num" == 7 ]]; then
num=0 num=0
echo " " >>/var/plexguide/pgbox.output echo " " >>/var/plexguide/pgbox.output
fi fi
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
sed -i "/^$typed\b/Id" /var/plexguide/app.list sed -i "/^$typed\b/Id" /var/plexguide/app.list
question1 question1
} }
final() { final() {
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
echo echo
exit exit
} }
question2() { question2() {
# Image Selector # Image Selector
image=off image=off
while read p; do while read p; do
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
bash /opt/coreapps/apps/image/_image.sh bash /opt/coreapps/apps/image/_image.sh
# CName & Port Execution # CName & Port Execution
bash /opt/plexguide/menu/pgbox/cname.sh bash /opt/plexguide/menu/pgbox/cname.sh
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
# Cron Execution # Cron Execution
edition=$(cat /var/plexguide/pg.edition) edition=$(cat /var/plexguide/pg.edition)
if [[ "$edition" == "PG Edition - HD Solo" ]]; then if [[ "$edition" == "PG Edition - HD Solo" ]]; then
a=b a=b
else else
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup) croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
echo "false" >/var/plexguide/cron.count echo "false" >/var/plexguide/cron.count
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
fi fi
while read p; do while read p; do
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -222,26 +222,26 @@ $p - Now Installing!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1 sleep 1
# Store Used Program # Store Used Program
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
# Execute Main Program # Execute Main Program
ansible-playbook /opt/coreapps/apps/$p.yml ansible-playbook /opt/coreapps/apps/$p.yml
if [[ "$edition" == "PG Edition - HD Solo" ]]; then if [[ "$edition" == "PG Edition - HD Solo" ]]; then
a=b a=b
elif [ "$croncount" -eq "1" ]; then cronexe; fi elif [ "$croncount" -eq "1" ]; then cronexe; fi
# End Banner # End Banner
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
sleep 2 sleep 2
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
echo "" >>/tmp/output.info echo "" >>/tmp/output.info
cat /tmp/output.info cat /tmp/output.info
final final
} }
@@ -252,7 +252,7 @@ start() {
} }
folder() { folder() {
mkdir -p /opt/coreapps mkdir -p /opt/coreapps
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################

View File

@@ -13,7 +13,7 @@
- name: Cloning GCE Apps - name: Cloning GCE Apps
git: git:
repo: 'https://github.com/Pandaura/Apps-GCE' repo: 'https://github.com/MHA-Team/Apps-GCE'
dest: /opt/coreapps dest: /opt/coreapps
version: 'master' version: 'master'
force: yes force: yes

View File

@@ -7,7 +7,6 @@
################################################################################ ################################################################################
# FUNCTIONS START ############################################################## # FUNCTIONS START ##############################################################
typed="${typed,,}"
source /opt/plexguide/menu/functions/functions.sh source /opt/plexguide/menu/functions/functions.sh
variable /var/plexguide/boxpersonal.user NON-SET variable /var/plexguide/boxpersonal.user NON-SET
variable /var/plexguide/boxpersonal.repo NON-SET variable /var/plexguide/boxpersonal.repo NON-SET
@@ -15,119 +14,119 @@ variable /var/plexguide/boxpersonal.branch NON-SET
queued() { queued() {
echo echo
read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
question1 question1
} }
value() { value() {
bash /opt/plexguide/menu/pgbox/value.sh bash /opt/plexguide/menu/pgbox/value.sh
} }
exists() { exists() {
echo "" echo ""
echo " ERROR - $typed Already Installed!" echo " ERROR - $typed Already Installed!"
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
part1 part1
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
question1 question1
else exists; fi else exists; fi
} }
cronexe() { cronexe() {
croncheck=$(cat /opt/mycontainers/apps/_cron.list | grep -c "\<$p\>") croncheck=$(cat /opt/mycontainers/apps/_cron.list | grep -c "\<$p\>")
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
} }
cronmass() { cronmass() {
croncheck=$(cat /opt/mycontainers/apps/_cron.list | grep -c "\<$p\>") croncheck=$(cat /opt/mycontainers/apps/_cron.list | grep -c "\<$p\>")
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
} }
initial() { initial() {
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1 rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1 rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1 rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1 rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
touch /var/plexguide/pgbox.output touch /var/plexguide/pgbox.output
touch /var/plexguide/program.temp touch /var/plexguide/program.temp
touch /var/plexguide/app.list touch /var/plexguide/app.list
touch /var/plexguide/pgbox.buildup touch /var/plexguide/pgbox.buildup
mkdir -p /opt/mycontainers mkdir -p /opt/mycontainers
ansible-playbook /opt/plexguide/menu/pgbox/personal/personal.yml ansible-playbook /opt/plexguide/menu/pgbox/personal/personal.yml
file="/opt/mycontainers/place.holder" file="/opt/mycontainers/place.holder"
waitvar=0 waitvar=0
while [ "$waitvar" == "0" ]; do while [ "$waitvar" == "0" ]; do
sleep .5 sleep .5
if [ -e "$file" ]; then waitvar=1; fi if [ -e "$file" ]; then waitvar=1; fi
done done
} }
question1() { question1() {
### Remove Running Apps ### Remove Running Apps
while read p; do while read p; do
sed -i "/^$p\b/Id" /var/plexguide/app.list sed -i "/^$p\b/Id" /var/plexguide/app.list
done </var/plexguide/pgbox.running done </var/plexguide/pgbox.running
cp /var/plexguide/app.list /var/plexguide/app.list2 cp /var/plexguide/app.list /var/plexguide/app.list2
file="/var/plexguide/personal.app" file="/var/plexguide/personal.app"
#if [ ! -e "$file" ]; then #if [ ! -e "$file" ]; then
ls -la /opt/mycontainers/apps | sed -e 's/.yml//g' | ls -la /opt/mycontainers/apps | sed -e 's/.yml//g' |
awk '{print $9}' | tail -n +4 >/var/plexguide/app.list awk '{print $9}' | tail -n +4 >/var/plexguide/app.list
while read p; do while read p; do
echo "" >>/opt/mycontainers/apps/$p.yml echo "" >>/opt/mycontainers/apps/$p.yml
echo "##PG-personal" >>/opt/mycontainers/apps/$p.yml echo "##PG-personal" >>/opt/mycontainers/apps/$p.yml
mkdir -p /opt/mycontainers mkdir -p /opt/mycontainers
touch /opt/appdata/plexguide/rclone.conf touch /opt/appdata/plexguide/rclone.conf
done </var/plexguide/app.list done </var/plexguide/app.list
touch /var/plexguide/personal.app touch /var/plexguide/personal.app
#fi #fi
#bash /opt/mycontainers/apps/_appsgen.sh #bash /opt/mycontainers/apps/_appsgen.sh
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
### Remove Official Apps ### Remove Official Apps
while read p; do while read p; do
# reminder, need one for custom apps # reminder, need one for custom apps
baseline=$(cat /opt/mycontainers/apps/$p.yml | grep "##PG-personal") baseline=$(cat /opt/mycontainers/apps/$p.yml | grep "##PG-personal")
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
done </var/plexguide/app.list done </var/plexguide/app.list
### Blank Out Temp List ### Blank Out Temp List
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
### List Out Apps In Readable Order (One's Not Installed) ### List Out Apps In Readable Order (One's Not Installed)
num=0 num=0
sed -i -e "/templates/d" /var/plexguide/app.list sed -i -e "/templates/d" /var/plexguide/app.list
sed -i -e "/image/d" /var/plexguide/app.list sed -i -e "/image/d" /var/plexguide/app.list
sed -i -e "/watchtower/d" /var/plexguide/app.list sed -i -e "/watchtower/d" /var/plexguide/app.list
sed -i -e "/_/d" /var/plexguide/app.list sed -i -e "/_/d" /var/plexguide/app.list
while read p; do while read p; do
echo -n $p >>/var/plexguide/program.temp echo -n $p >>/var/plexguide/program.temp
echo -n " " >>/var/plexguide/program.temp echo -n " " >>/var/plexguide/program.temp
num=$((num + 1)) num=$((num + 1))
if [[ "$num" == "7" ]]; then if [[ "$num" == "7" ]]; then
num=0 num=0
echo " " >>/var/plexguide/program.temp echo " " >>/var/plexguide/program.temp
fi fi
done </var/plexguide/app.list done </var/plexguide/app.list
notrun=$(cat /var/plexguide/program.temp) notrun=$(cat /var/plexguide/program.temp)
buildup=$(cat /var/plexguide/pgbox.output) buildup=$(cat /var/plexguide/pgbox.output)
if [ "$buildup" == "" ]; then buildup="NONE"; fi if [ "$buildup" == "" ]; then buildup="NONE"; fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PTS ~ Multi-App Installer || Personal Versions 🚀 PTS ~ Multi-App Installer || Personal Versions
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential Apps to Install 📂 Potential Apps to Install
@@ -145,75 +144,75 @@ $buildup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then question2; fi if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then exit; fi
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>") current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
if [ "$current" != "" ]; then queued && question1; fi if [ "$current" != "" ]; then queued && question1; fi
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>") current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
if [ "$current" != "" ]; then exists && question1; fi if [ "$current" != "" ]; then exists && question1; fi
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>") current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
if [ "$current" == "" ]; then badinput1 && question1; fi if [ "$current" == "" ]; then badinput1 && question1; fi
part1 part1
} }
part1() { part1() {
echo "$typed" >>/var/plexguide/pgbox.buildup echo "$typed" >>/var/plexguide/pgbox.buildup
num=0 num=0
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
while read p; do while read p; do
echo -n $p >>/var/plexguide/pgbox.output echo -n $p >>/var/plexguide/pgbox.output
echo -n " " >>/var/plexguide/pgbox.output echo -n " " >>/var/plexguide/pgbox.output
if [[ "$num" == 7 ]]; then if [[ "$num" == 7 ]]; then
num=0 num=0
echo " " >>/var/plexguide/pgbox.output echo " " >>/var/plexguide/pgbox.output
fi fi
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
sed -i "/^$typed\b/Id" /var/plexguide/app.list sed -i "/^$typed\b/Id" /var/plexguide/app.list
question1 question1
} }
final() { final() {
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
echo echo
exit exit
} }
question2() { question2() {
# Image Selector # Image Selector
image=off image=off
while read p; do while read p; do
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
if [[ -d "/opt/mycontainers/apps/image/" ]]; then if [[ -d "/opt/mycontainers/apps/image/" ]]; then
bash /opt/mycontainers/apps/image/_image.sh ; fi bash /opt/mycontainers/apps/image/_image.sh ; fi
# CName & Port Execution # CName & Port Execution
bash /opt/plexguide/menu/pgbox/cname.sh bash /opt/plexguide/menu/pgbox/cname.sh
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
# Cron Execution # Cron Execution
edition=$(cat /var/plexguide/pg.edition) edition=$(cat /var/plexguide/pg.edition)
if [[ "$edition" == "Edition - HD Solo" ]]; then if [[ "$edition" == "Edition - HD Solo" ]]; then
a=b a=b
else else
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup) croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
echo "false" >/var/plexguide/cron.count echo "false" >/var/plexguide/cron.count
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
fi fi
while read p; do while read p; do
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -221,46 +220,46 @@ $p - Now Installing!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1 sleep 1
##### CHECK START ##### ##### CHECK START #####
value value
##### CHECK EXIT ##### ##### CHECK EXIT #####
# Store Used Program # Store Used Program
echo "$p" >/tmp/program_var echo "$p" >/tmp/program_var
# Execute Main Program # Execute Main Program
ansible-playbook /opt/mycontainers/apps/$p.yml ansible-playbook /opt/mycontainers/apps/$p.yml
if [[ "$edition" == "PG Edition - HD Solo" ]]; then if [[ "$edition" == "PG Edition - HD Solo" ]]; then
a=b a=b
elif [ "$croncount" -eq "1" ]; then cronexe; fi elif [ "$croncount" -eq "1" ]; then cronexe; fi
# End Banner # End Banner
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
sleep 2 sleep 2
done </var/plexguide/pgbox.buildup done </var/plexguide/pgbox.buildup
echo "" >>/tmp/output.info echo "" >>/tmp/output.info
cat /tmp/output.info cat /tmp/output.info
final final
} }
mainbanner() { mainbanner() {
boxuser=$(cat /var/plexguide/boxpersonal.user) boxuser=$(cat /var/plexguide/boxpersonal.user)
boxrepo=$(cat /var/plexguide/boxpersonal.repo) boxrepo=$(cat /var/plexguide/boxpersonal.repo)
boxbranch=$(cat /var/plexguide/boxpersonal.branch) boxbranch=$(cat /var/plexguide/boxpersonal.branch)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PTS personal Box Edition! 🚀 PTS personal Box Edition!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 💬
User: $boxuser User: $boxuser
Repo: $boxrepo Repo: $boxrepo
Branch: $boxbranch Branch: $boxbranch
@@ -272,11 +271,11 @@ Branch: $boxbranch
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Type a Selection | Press [ENTER]: ' typed </dev/tty read -p 'Type a Selection | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) 1)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -288,30 +287,30 @@ Username / Branch & Repo are both case sensitive!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Username | Press [ENTER]: ' boxuser </dev/tty read -p 'Username | Press [ENTER]: ' boxuser </dev/tty
read -p 'REPO | Press [ENTER]: ' boxrepo </dev/tty read -p 'REPO | Press [ENTER]: ' boxrepo </dev/tty
read -p 'Branch | Press [ENTER]: ' boxbranch </dev/tty read -p 'Branch | Press [ENTER]: ' boxbranch </dev/tty
echo "$boxuser" >/var/plexguide/boxpersonal.user echo "$boxuser" >/var/plexguide/boxpersonal.user
echo "$boxrepo" >/var/plexguide/boxpersonal.repo echo "$boxrepo" >/var/plexguide/boxpersonal.repo
echo "$boxbranch" >/var/plexguide/boxpersonal.branch echo "$boxbranch" >/var/plexguide/boxpersonal.branch
mainbanner mainbanner
;; ;;
2) 2)
existcheck=$(git ls-remote --exit-code -h "https://github.com/$(cat /var/plexguide/boxpersonal.user)/$(cat /var/plexguide/boxpersonal.repo)" | grep "$(cat /var/plexguide/boxpersonal.branch)") existcheck=$(git ls-remote --exit-code -h "https://github.com/$(cat /var/plexguide/boxpersonal.user)/$(cat /var/plexguide/boxpersonal.repo)" | grep "$(cat /var/plexguide/boxpersonal.branch)")
if [ "$existcheck" == "" ]; then if [ "$existcheck" == "" ]; then
echo echo
read -p '💬 Exiting! Forked Version Does Not Exist! | Press [ENTER]: ' typed </dev/tty read -p '💬 Exiting! Forked Version Does Not Exist! | Press [ENTER]: ' typed </dev/tty
mainbanner mainbanner
fi fi
initial && question1 ;; initial && question1 ;;
z) exit ;; z) exit ;;
Z) exit ;; Z) exit ;;
*) mainbanner ;; *) mainbanner ;;
esac esac
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################
echo "" >/tmp/output.info echo "" >/tmp/output.info
mainbanner mainbanner

View File

@@ -5,7 +5,6 @@
# URL: https://pgblitz.com - http://github.pgblitz.com # URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
typed="${typed,,}"
rm -rf /tmp/backup.build 1>/dev/null 2>&1 rm -rf /tmp/backup.build 1>/dev/null 2>&1
rm -rf /tmp/backup.list 1>/dev/null 2>&1 rm -rf /tmp/backup.list 1>/dev/null 2>&1
rm -rf /tmp/backup.final 1>/dev/null 2>&1 rm -rf /tmp/backup.final 1>/dev/null 2>&1
@@ -25,13 +24,13 @@ sed -i -e "/portainer/d" /tmp/backup.list
#### Commenting Out To Let User See #### Commenting Out To Let User See
num=0 num=0
while read p; do while read p; do
let "num++" let "num++"
echo -n $p >>/tmp/backup.final echo -n $p >>/tmp/backup.final
echo -n " " >>/tmp/backup.final echo -n " " >>/tmp/backup.final
if [[ "$num" == 7 ]]; then if [[ "$num" == 7 ]]; then
num=0 num=0
echo " " >>/tmp/backup.final echo " " >>/tmp/backup.final
fi fi
done </tmp/backup.list done </tmp/backup.list
running=$(cat /tmp/backup.final) running=$(cat /tmp/backup.final)
@@ -40,12 +39,12 @@ running=$(cat /tmp/backup.final)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 App Removal Interface 🚀 App Removal Interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ This will remove your app data folder. Make sure you backup! ⚠️ Backup Data if Required! Removes Local App Data!
💾 Apps currently installed 💾 Current Installed Apps or Folders
$running $running
@@ -56,52 +55,52 @@ $running
EOF EOF
read -p '🌍 Type APP for QUEUE | Press [[ENTER]: ' typed </dev/tty read -p '🌍 Type APP for QUEUE | Press [[ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then exit; fi
tcheck=$(echo $running | grep "\<$typed\>") tcheck=$(echo $running | grep "\<$typed\>")
if [[ "$tcheck" == "" ]]; then if [[ "$tcheck" == "" ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Type an Application Name! Case Senstive! Restarting! WARNING! - Type an Application Name! Case Senstive! Restarting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1.5 sleep 1.5
bash /opt/plexguide/menu/pgbox/remove/removal.sh bash /opt/plexguide/menu/pgbox/remove/removal.sh
exit exit
fi fi
if [[ "$typed" == "" ]]; then if [[ "$typed" == "" ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Cannot be left blank. Please type an app WARNING! - The App Name Cannot Be Blank!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 3 sleep 3
bash /opt/traefik/tld.sh bash /opt/traefik/tld.sh
exit exit
fi fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 Now uninstalling - $typed 💎 PASS: Uninstalling - $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1.5 sleep 1.5
##check for running docker ##check for running docker
drunning=$(docker ps --format '{{.Names}}' | grep "$typed") drunning=$(docker ps --format '{{.Names}}' | grep "$typed")
if [[ "$drunning" == "$typed" ]]; then if [[ "$drunning" == "$typed" ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🍖 NOM NOM - Stopping container & uninstalling > $typed 🍖 NOM NOM - Stopping | Removing > $typed Docker Container
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
docker stop $typed 1>/dev/null 2>&1 docker stop $typed 1>/dev/null 2>&1
docker rm $typed 1>/dev/null 2>&1 docker rm $typed 1>/dev/null 2>&1
rm -rf /opt/appdata/$typed rm -rf /opt/appdata/$typed
fi fi
if [[ "$drunning" != "$typed" ]]; then if [[ "$drunning" != "$typed" ]]; then
@@ -111,14 +110,14 @@ tee <<-EOF
🍖 NOM NOM - Removing /opt/appdata/$typed 🍖 NOM NOM - Removing /opt/appdata/$typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
rm -rf /opt/appdata/$typed rm -rf /opt/appdata/$typed
fi fi
file="/opt/coreapps/apps/$typed.yml" file="/opt/coreapps/apps/$typed.yml"
if [[ -e "$file" ]]; then if [[ -e "$file" ]]; then
check=$(cat /opt/coreapps/apps/$typed.yml | grep '##PG-Community') check=$(cat /opt/coreapps/apps/$typed.yml | grep '##PG-Community')
if [[ "$check" == "##PG-Community" ]]; then rm -r /opt/communityapps/apps/$typed.yml; fi if [[ "$check" == "##PG-Community" ]]; then rm -r /opt/communityapps/apps/$typed.yml; fi
rm -rf /var/plexguide/community.app rm -rf /var/plexguide/community.app
fi fi
sleep 1.5 sleep 1.5
@@ -126,7 +125,7 @@ sleep 1.5
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ Successfully uninstalled $typed - Now exiting... ✅️ PASS: Uninstalled - $typed - Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 2 sleep 2

View File

@@ -7,10 +7,10 @@
################################################################################ ################################################################################
GCEtest(){ GCEtest(){
gce=$(cat /var/plexguide/pg.server.deploy) gce=$(cat /var/plexguide/pg.server.deploy)
if [[ $gce == "feeder" ]]; then if [[ $gce == "feeder" ]]; then
mainstart2 mainstart2
else mainstart1; fi else mainstart1; fi
} }
@@ -18,63 +18,63 @@ mainstart1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Box Apps Interface Selection 🚀 Box Apps Interface Selection
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Pandaura installs a series of Core and Community applications 💬 PTS Box installs a series of Core and Community applications!
[1] Pandaura : Core [1] PTS : Core
[2] Pandaura : Community [2] PTS : Community
--------------------------------- --------------------------------
[3] Personal Fork : Use your own Github fork [3] Apps : Personal Forks
[4] Uninstaller : Remove installed apps [4] Apps : Removal
[5] Apps : Auto Update [5] Apps : Auto Update
[Z] Exit [Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
# Standby # Standby
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) clear && bash /opt/plexguide/menu/pgbox/core/core.sh ;; 1) bash /opt/plexguide/menu/pgbox/core/core.sh ;;
2) clear && bash /opt/plexguide/menu/pgbox/community/community.sh ;; 2) bash /opt/plexguide/menu/pgbox/community/community.sh ;;
3) clear && bash /opt/plexguide/menu/pgbox/personal/personal.sh ;; 3) bash /opt/plexguide/menu/pgbox/personal/personal.sh ;;
4) clear && bash /opt/plexguide/menu/pgbox/remove/removal.sh ;; 4) bash /opt/plexguide/menu/pgbox/remove/removal.sh ;;
5) clear && bash /opt/plexguide/menu/pgbox/customparts/autobackup.sh ;; 5) bash /opt/plexguide/menu/pgbox/customparts/autobackup.sh ;;
z) exit ;; z) exit ;;
Z) exit ;; Z) exit ;;
*) GCEtest ;; *) GCEtest ;;
esac esac
} }
mainstart2() { mainstart2() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 GCE optimized Apps 🚀 GCE APPS optimized Apps
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] GCE optimized Apps : GCE APPS [1] PTS GCE optimized Apps : GCE APPS
[2] Uninstaller : Remove installed apps [2] Apps : Removal
[Z] Exit [Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) bash /opt/plexguide/menu/pgbox/gce/gcecore.sh ;; 1) bash /opt/plexguide/menu/pgbox/gce/gcecore.sh ;;
2) bash /opt/plexguide/menu/pgbox/remove/removal.sh ;; 2) bash /opt/plexguide/menu/pgbox/remove/removal.sh ;;
z) exit ;; z) exit ;;
Z) exit ;; Z) exit ;;
*) GCEtest ;; *) GCEtest ;;
esac esac
} }
GCEtest GCEtest

View File

@@ -47,7 +47,7 @@ mainbanner() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 $roleproper 🚀 $roleproper
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$clonerinfo $clonerinfo
@@ -91,7 +91,7 @@ pinterface() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 $roleproper 🚀 $roleproper
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 User: $user | Branch: $branch 💬 User: $user | Branch: $branch

View File

@@ -25,7 +25,7 @@
- name: Clone Role - name: Clone Role
git: git:
repo: 'https://github.com/Pandaura/{{pname.stdout}}' repo: 'https://github.com/MHA-Team/{{pname.stdout}}'
dest: '/opt/{{prole.stdout}}' dest: '/opt/{{prole.stdout}}'
version: '{{pversion.stdout}}' version: '{{pversion.stdout}}'
force: yes force: yes

View File

@@ -50,7 +50,7 @@ mainbanner() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 $roleproper 🚀 $roleproper
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$clonerinfo $clonerinfo
@@ -95,7 +95,7 @@ pinterface() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 $roleproper 🚀 $roleproper
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 User: $user | Branch: $branch 💬 User: $user | Branch: $branch

View File

@@ -25,7 +25,7 @@
- name: Clone Role - name: Clone Role
git: git:
repo: 'https://github.com/Pandaura/{{pname.stdout}}' repo: 'https://github.com/MHA-Team/{{pname.stdout}}'
dest: '/opt/{{prole.stdout}}' dest: '/opt/{{prole.stdout}}'
version: '{{pversion.stdout}}' version: '{{pversion.stdout}}'
force: yes force: yes

View File

@@ -25,7 +25,7 @@
- name: Clone Role - name: Clone Role
git: git:
repo: 'https://github.com/Pandaura/{{pname.stdout}}' repo: 'https://github.com/MHA-Team/{{pname.stdout}}'
dest: '/opt/{{prole.stdout}}' dest: '/opt/{{prole.stdout}}'
version: '{{pversion.stdout}}' version: '{{pversion.stdout}}'
force: yes force: yes

View File

@@ -29,6 +29,15 @@ startlink=$(cat /var/plexguide/pgcloner.startlink)
mkdir -p "/opt/$rolename" mkdir -p "/opt/$rolename"
initial() { initial() {
ansible-playbook "/opt/plexguide/menu/pgcloner/clone/primary.yml" >/dev/null 2>&1
echo ""
echo "💬 Pulling Update Files - Please Wait"
file="/opt/$rolename/place.holder"
waitvar=0
while [ "$waitvar" == "0" ]; do
sleep .5
if [ -e "$file" ]; then waitvar=1; fi
done
bash /opt/${rolename}/${startlink} bash /opt/${rolename}/${startlink}
} }
initial initial

45
menu/pgcloner/pgvault.sh Normal file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
### FILL OUT THIS AREA ###
echo 'pgvault' >/var/plexguide/pgcloner.rolename
echo 'PTS-Vault' >/var/plexguide/pgcloner.roleproper
echo 'PTS-Vault' >/var/plexguide/pgcloner.projectname
echo 'master' >/var/plexguide/pgcloner.projectversion
echo 'pgvault.sh' >/var/plexguide/pgcloner.startlink
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo "💬 Vault is a combined group of services that utilizes the backup
and restore processes, which enables the safe storage and transport through
the use of Google Drive in a hasty and efficient manner!" >/var/plexguide/pgcloner.info
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
### START PROCESS
source /opt/plexguide/menu/functions/functions.sh
rolename=$(cat /var/plexguide/pgcloner.rolename)
roleproper=$(cat /var/plexguide/pgcloner.roleproper)
projectname=$(cat /var/plexguide/pgcloner.projectname)
projectversion=$(cat /var/plexguide/pgcloner.projectversion)
startlink=$(cat /var/plexguide/pgcloner.startlink)
mkdir -p "/opt/$rolename"
initial() {
ansible-playbook "/opt/plexguide/menu/pgcloner/clone/primary.yml" >/dev/null 2>&1
echo ""
echo "💬 Pulling Update Files - Please Wait"
file="/opt/$rolename/place.holder"
waitvar=0
while [ "$waitvar" == "0" ]; do
sleep .5
if [ -e "$file" ]; then waitvar=1; fi
done
bash /opt/${rolename}/${startlink}
}
initial

View File

@@ -15,7 +15,7 @@ file2="/var/plexguide/gce.check"
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You Must Execute as a SUDO USER (with sudo) or as ROOT! You Must Execute as a SUDO USER (with sudo) or as ROOT!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF

View File

@@ -1,129 +1,125 @@
#!/bin/bash #!/bin/bash
# FUNCTIONS START ############################################################## # FUNCTIONS START ##############################################################
pgautoscan="autoscan"
typed="${typed,,}"
rmoldinstall() { rmoldinstall() {
dcheck=$(systemctl is-active plex_autoscan.service) dcheck=$(systemctl is-active plex_autoscan.service)
if [[ "$dcheck" == "active" ]]; then if [[ "$dcheck" == "active" ]]; then
service plex_autoscan stop service plex_autoscan stop
rm -rf /opt/plex_autoscan rm -rf /opt/plex_autoscan
rm -rf /etc/systemd/system/plex_autoscan.service rm -rf /etc/systemd/system/plex_autoscan.service
rm -rf /var/plexguide/pgscan rm -rf /var/plexguide/pgscan
fresh fresh
else fresh; fi else fresh; fi
} }
fresh() { fresh() {
mkdir -p /var/plexguide/pgscan mkdir -p /var/plexguide/pgscan
echo "en" >/var/plexguide/pgscan/fixmatch.lang echo "en" >/var/plexguide/pgscan/fixmatch.lang
echo "false" >/var/plexguide/pgscan/fixmatch.status echo "false" >/var/plexguide/pgscan/fixmatch.status
echo "NOT-SET" >/var/plexguide/pgscan/plex.docker echo "NOT-SET" >/var/plexguide/pgscan/plex.docker
} }
variable() { variable() {
file="$1" file="$1"
if [[ ! -e "$file" ]]; then echo "$2" >$1; fi if [[ ! -e "$file" ]]; then echo "$2" >$1; fi
} }
deploycheck() { deploycheck() {
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan") dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
if [[ "$dcheck" == "plexautoscan" ]]; then if [[ "$dcheck" == "plexautoscan" ]]; then
dstatus="✅ DOCKER DEPLOYED" dstatus="✅ DOCKER DEPLOYED"
else dstatus="⚠️ DOCKER NOT DEPLOYED"; fi else dstatus="⚠️ DOCKER NOT DEPLOYED"; fi
} }
tokenstatus() { tokenstatus() {
ptokendep=$(cat /var/plexguide/pgscan/plex.token) ptokendep=$(cat /var/plexguide/pgscan/plex.token)
if [[ "$ptokendep" != "" ]]; then if [[ "$ptokendep" != "" ]]; then
if [[ ! -f "/opt/appdata/plexautoscan/config/config.json" ]]; then if [[ ! -f "/opt/appdata/plexautoscan/config/config.json" ]]; then
pstatus="❌ TOKEN DEPLOYED || PAS CONFIG MISSING"; pstatus="❌ TOKEN DEPLOYED || PAS CONFIG MISSING";
else else
PGSELFTEST=$(curl -LI "http://$(hostname -I | awk '{print $1}'):32400/system?X-Plex-Token=$(cat /opt/appdata/plexautoscan/config/config.json | jq .PLEX_TOKEN | sed 's/"//g')" -o /dev/null -w '%{http_code}\n' -s) PGSELFTEST=$(curl -LI "http://$(hostname -I | awk '{print $1}'):32400/system?X-Plex-Token=$(cat /opt/appdata/plexautoscan/config/config.json | jq .PLEX_TOKEN | sed 's/"//g')" -o /dev/null -w '%{http_code}\n' -s)
if [[ $PGSELFTEST -ge 200 && $PGSELFTEST -le 299 ]]; then pstatus="✅ TOKEN DEPLOYED" if [[ $PGSELFTEST -ge 200 && $PGSELFTEST -le 299 ]]; then pstatus="✅ TOKEN DEPLOYED"
else pstatus="❌ DOCKER DEPLOYED || PAS TOKEN FAILED"; fi else pstatus="❌ DOCKER DEPLOYED || PAS TOKEN FAILED"; fi
fi fi
else pstatus="⚠️ NOT DEPLOYED"; fi else pstatus="⚠️ NOT DEPLOYED"; fi
} }
plexcheck() { plexcheck() {
pcheck=$(docker ps --format '{{.Names}}' | grep "plex") pcheck=$(docker ps --format '{{.Names}}' | grep "plex")
if [[ "$pcheck" == "" ]]; then if [[ "$pcheck" == "" ]]; then
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Plex is Not Installed or Running! Exiting! WARNING! - Plex is Not Installed or Running! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
dontwork dontwork
fi fi
} }
token() { token() {
touch /var/plexguide/pgscan/plex.token touch /var/plexguide/pgscan/plex.token
ptoken=$(cat /var/plexguide/pgscan/plex.token)
if [[ ! -f "$ptoken" ]]; then
tokencreate
sleep 2
X_PLEX_TOKEN=$(sudo cat "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1)
ptoken=$(cat /var/plexguide/pgscan/plex.token) ptoken=$(cat /var/plexguide/pgscan/plex.token)
if [[ ! -f "$ptoken" ]]; then if [[ "$ptoken" != "$X_PLEX_TOKEN" ]]; then
tokencreate printf '
sleep 2
X_PLEX_TOKEN=$(sudo cat "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1)
ptoken=$(cat /var/plexguide/pgscan/plex.token)
if [[ "$ptoken" != "$X_PLEX_TOKEN" ]]; then
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! Failed to Generate a Valid Plex Token! WARNING! Failed to Generate a Valid Plex Token!
WARNING! Exiting Deployment! WARNING! Exiting Deployment!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
dontwork dontwork
fi
fi fi
fi
} }
tokencreate() { tokencreate() {
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 START Plex_AutoScan Token Create 🚀 START Plex_AutoScan Token Create
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
templatebackup=/opt/plexguide/menu/pgscan/templates/config.backup templatebackup=/opt/plexguide/menu/pgscan/templates/config.backup
template=/opt/plexguide/menu/pgscan/templates/config.json.j2 template=/opt/plexguide/menu/pgscan/templates/config.json.j2
X_PLEX_TOKEN=$(sudo cat "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1) X_PLEX_TOKEN=$(sudo cat "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1)
cp -r $template $templatebackup cp -r $template $templatebackup
echo $X_PLEX_TOKEN >/var/plexguide/pgscan/plex.token echo $X_PLEX_TOKEN >/var/plexguide/pgscan/plex.token
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ FINISHED Plex_AutoScan Token 🛈 START SERVERPASS Create ✅ FINISHED Plex_AutoScan Token 🚀 START SERVERPASS Create
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
RAN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) RAN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
echo $RAN >/var/plexguide/pgscan/pgscan.serverpass echo $RAN >/var/plexguide/pgscan/pgscan.serverpass
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ FINISHED Plex_AutoScan Token || SERVERPASS ✅ FINISHED Plex_AutoScan Token || SERVERPASS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
timerremove timerremove
question1 question1
} }
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
clear && question1 clear && question1
} }
dontwork() { dontwork() {
echo echo
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
clear && exit 0 clear && exit 0
} }
works() { works() {
echo echo
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
clear && question1 clear && question1
} }
credits() { credits() {
clear clear
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Credits 🚀 Plex_AutoScan Credits
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
######################################################################### #########################################################################
@@ -139,94 +135,94 @@ credits() {
######################################################################### #########################################################################
# GNU General Public License v3.0 # # GNU General Public License v3.0 #
######################################################################### #########################################################################
' '
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
clear && question1 clear && question1
} }
doneenter() { doneenter() {
echo echo
read -p 'All done | PRESS [ENTER] ' typed </dev/tty read -p 'All done | PRESS [ENTER] ' typed </dev/tty
clear && question1 clear && question1
} }
####REMOVEPART start ####REMOVEPART start
# KEY VARIABLE RECALL & EXECUTION # KEY VARIABLE RECALL & EXECUTION
timerremove() { timerremove() {
seconds=10; date1=$((`date +%s` + $seconds)); seconds=10; date1=$((`date +%s` + $seconds));
while [ "$date1" -ge `date +%s` ]; do while [ "$date1" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r"; echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r";
done done
} }
remove() { remove() {
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan") dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
if [[ "$dcheck" == "plexautoscan" ]]; then if [[ "$dcheck" == "plexautoscan" ]]; then
removepas removepas
else else
notinstalled notinstalled
fi fi
} }
removepas() { removepas() {
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 STARTING Remove Plex AutoScan Docker || l3uddz/plex_autoscan 🚀 STARTING Remove Plex AutoScan Docker || l3uddz/plex_autoscan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
docker stop plexautoscan docker stop plexautoscan
docker rm plexautoscan docker rm plexautoscan
rm -rf /opt/appdata/plexautoscan rm -rf /opt/appdata/plexautoscan
rm -rf /var/plexguide/pgscan rm -rf /var/plexguide/pgscan
fresh fresh
echo "en" >/var/plexguide/pgscan/fixmatch.lang echo "en" >/var/plexguide/pgscan/fixmatch.lang
echo "false" >/var/plexguide/pgscan/fixmatch.status echo "false" >/var/plexguide/pgscan/fixmatch.status
echo "NOT-SET" >/var/plexguide/pgscan/plex.docker echo "NOT-SET" >/var/plexguide/pgscan/plex.docker
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 FINISHED REMOVE Plex AutoScan Docker 🚀 FINISHED REMOVE Plex AutoScan Docker
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
timerremove timerremove
question1 question1
} }
notinstalled() { notinstalled() {
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - PAS is Not Installed or Running! Exiting! WARNING! - PAS is Not Installed or Running! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
timerremove timerremove
question1 question1
} }
##### REMOVE END ##### REMOVE END
logger() { logger() {
dcheck=$(docker ps --format '{{.Names}}' | grep "$pgautoscan") dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
if [[ "$dcheck" == "$pgautoscan" ]]; then if [[ "$dcheck" == "plexautoscan" ]]; then
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 ACTIVE LOGS Plex AutoScan Docker || l3uddz/plex_autoscan 🚀 ACTIVE LOGS Plex AutoScan Docker || l3uddz/plex_autoscan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
tail -n 50 /opt/appdata/$pgautoscan/config/plex_autoscan.log tail -n 50 /opt/appdata/plexautoscan/config/plex_autoscan.log
doneenter doneenter
else else
notinstalled notinstalled
fi fi
} }
fxmatch() { fxmatch() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan FixMatching 🚀 Plex_AutoScan FixMatching
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE : NOTE :
Plex Autoscan will compare the TVDBID/TMDBID/IMDBID sent Plex Autoscan will compare the TVDBID/TMDBID/IMDBID sent
by Sonarr/Radarr with what Plex has matched with, and if by Sonarr/Radarr with what Plex has matched with, and if
this match is incorrect, it will autocorrect the match on the this match is incorrect, it will autocorrect the match on the
item (movie file or TV episode). If the incorrect match is item (movie file or TV episode). If the incorrect match is
a duplicate entry in Plex, it will auto split the original a duplicate entry in Plex, it will auto split the original
entry before correcting the match on the new item. entry before correcting the match on the new item.
@@ -238,28 +234,28 @@ entry before correcting the match on the new item.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) lang && clear && fxmatch ;; 1) lang && clear && fxmatch ;;
2) runs && clear && fxmatch ;; 2) runs && clear && fxmatch ;;
z) question1 ;; z) question1 ;;
Z) question1 ;; Z) question1 ;;
*) fxmatch ;; *) fxmatch ;;
esac esac
} }
lang() { lang() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan FixMatching Lang 🚀 Plex_AutoScan FixMatching Lang
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE : Sample : NOTE : Sample :
this will work : this will work :
en en
de de
jp jp
ch ch
@@ -270,12 +266,12 @@ Default is "en"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Lang | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Lang | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
fxmatch fxmatch
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -286,49 +282,49 @@ Language Set Is: $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo $typed >/var/plexguide/pgscan/fixmatch.lang echo $typed >/var/plexguide/pgscan/fixmatch.lang
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fxmatch fxmatch
fi fi
} }
runs() { runs() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Fix Missmatch 🚀 Plex_AutoScan Fix Missmatch
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] True [1] True
[2] False [2] False
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] - Exit [Z] - Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) echo "true" >/var/plexguide/pgscan/fixmatch.status && fxmatch ;; 1) echo "true" >/var/plexguide/pgscan/fixmatch.status && fxmatch ;;
2) echo "false" >/var/plexguide/pgscan/fixmatch.status && fxmatch ;; 2) echo "false" >/var/plexguide/pgscan/fixmatch.status && fxmatch ;;
z) fxmatch ;; z) fxmatch ;;
Z) fxmatch ;; Z) fxmatch ;;
*) fxmatch ;; *) fxmatch ;;
esac esac
} }
pversion() { pversion() {
plexcontainerversion=$(docker ps --format '{{.Image}}' | grep "plex:") plexcontainerversion=$(docker ps --format '{{.Image}}' | grep "plex:")
if [[ "$plexcontainerversion" == "linuxserver/plex:latest" ]]; then if [[ "$plexcontainerversion" == "linuxserver/plex:latest" ]]; then
echo -e "abc" >/var/plexguide/pgscan/plex.dockeruserset echo -e "abc" >/var/plexguide/pgscan/plex.dockeruserset
else echo "plex" >/var/plexguide/pgscan/plex.dockeruserset else echo "plex" >/var/plexguide/pgscan/plex.dockeruserset
fi fi
pasuserdocker=$(cat /var/plexguide/pgscan/plex.dockeruserset) pasuserdocker=$(cat /var/plexguide/pgscan/plex.dockeruserset)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex Docker 🚀 Plex Docker
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Linuxserver Docker used "abc" Linuxserver Docker used "abc"
Plex Docker used "plex" Plex Docker used "plex"
@@ -340,41 +336,41 @@ Set Plex Docker user: [ $pasuserdocker ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
cp -r /var/plexguide/pgscan/plex.dockeruserset /var/plexguide/pgscan/plex.docker 1>/dev/null 2>&1 cp -r /var/plexguide/pgscan/plex.dockeruserset /var/plexguide/pgscan/plex.docker 1>/dev/null 2>&1
doneenter doneenter
} }
showuppage() { showuppage() {
dpas=$(docker ps --format '{{.Names}}' | grep "plexautoscan") dpas=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
dtra=$(docker ps --format '{{.Names}}' | grep "traefik") dtra=$(docker ps --format '{{.Names}}' | grep "traefik")
if [[ "$dpas" == "plexautoscan" && "$dtra" == "traefik" ]]; then if [[ "$dpas" == "plexautoscan" && "$dtra" == "traefik" ]]; then
showpaspage="http://plexautoscan:3030/$(cat /var/plexguide/pgscan/pgscan.serverpass)" showpaspage="http://plexautoscan:3468/$(cat /var/plexguide/pgscan/pgscan.serverpass)"
else showpaspage="http://$(cat /var/plexguide/server.ip):3030/$(cat /var/plexguide/pgscan/pgscan.serverpass)"; fi else showpaspage="http://$(cat /var/plexguide/server.ip):3468/$(cat /var/plexguide/pgscan/pgscan.serverpass)"; fi
} }
question1() { question1() {
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan") dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
if [[ "$dcheck" == "plexautoscan" ]]; then if [[ "$dcheck" == "plexautoscan" ]]; then
deplyoed deplyoed
else undeployed; fi else undeployed; fi
} }
pasdeploy() { pasdeploy() {
ansible-playbook /opt/plexguide/menu/pgscan/yml/plexautoscan.yml ansible-playbook /opt/plexguide/menu/pgscan/yml/plexautoscan.yml
clear clear
} }
undeployed() { undeployed() {
langfa=$(cat /var/plexguide/pgscan/fixmatch.status) langfa=$(cat /var/plexguide/pgscan/fixmatch.status)
lang=$(cat /var/plexguide/pgscan/fixmatch.lang) lang=$(cat /var/plexguide/pgscan/fixmatch.lang)
dplexset=$(cat /var/plexguide/pgscan/plex.docker) dplexset=$(cat /var/plexguide/pgscan/plex.docker)
tokenstatus tokenstatus
deploycheck deploycheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Interface || l3uddz/plex_autoscan 🚀 Plex_AutoScan Interface || l3uddz/plex_autoscan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Deploy Plex Token [ $pstatus ] [1] Deploy Plex Token [ $pstatus ]
@@ -390,35 +386,35 @@ tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) tokencreate && clear && question1 ;; 1) tokencreate && clear && question1 ;;
2) fxmatch && clear && question1 ;; 2) fxmatch && clear && question1 ;;
3) pversion && clear && question1 ;; 3) pversion && clear && question1 ;;
A) pasdeploy && question1 ;; A) pasdeploy && question1 ;;
a) pasdeploy && question1 ;; a) pasdeploy && question1 ;;
C) credits && clear && question1 ;; C) credits && clear && question1 ;;
c) credits && clear && question1 ;; c) credits && clear && question1 ;;
z) exit 0 ;; z) exit 0 ;;
Z) exit 0 ;; Z) exit 0 ;;
*) question1 ;; *) question1 ;;
esac esac
} }
deplyoed() { deplyoed() {
langfa=$(cat /var/plexguide/pgscan/fixmatch.status) langfa=$(cat /var/plexguide/pgscan/fixmatch.status)
lang=$(cat /var/plexguide/pgscan/fixmatch.lang) lang=$(cat /var/plexguide/pgscan/fixmatch.lang)
dplexset=$(cat /var/plexguide/pgscan/plex.docker) dplexset=$(cat /var/plexguide/pgscan/plex.docker)
showuppage showuppage
tokenstatus tokenstatus
deploycheck deploycheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Interface || l3uddz/plex_autoscan 🚀 Plex_AutoScan Interface || l3uddz/plex_autoscan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Deploy Plex Token [ $pstatus ] [1] Deploy Plex Token [ $pstatus ]
@@ -444,25 +440,25 @@ PAS Webhook ARRs : [ $showpaspage ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) tokencreate && clear && question1 ;; 1) tokencreate && clear && question1 ;;
2) fxmatch && clear && question1 ;; 2) fxmatch && clear && question1 ;;
3) pversion && clear && question1 ;; 3) pversion && clear && question1 ;;
A) pasdeploy && question1 ;; A) pasdeploy && question1 ;;
a) pasdeploy && question1 ;; a) pasdeploy && question1 ;;
S) logger ;; S) logger ;;
s) logger ;; s) logger ;;
r) removepas ;; r) removepas ;;
R) removepas ;; R) removepas ;;
C) credits && clear && question1 ;; C) credits && clear && question1 ;;
c) credits && clear && question1 ;; c) credits && clear && question1 ;;
z) exit 0 ;; z) exit 0 ;;
Z) exit 0 ;; Z) exit 0 ;;
*) question1 ;; *) question1 ;;
esac esac
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################
rmoldinstall rmoldinstall

View File

@@ -1,48 +0,0 @@
# override the minimum age to 2 minutes:
minimum-age: 2m
# override the interval scan stats are displayed:
# defaults to 1 hour / 0s to disable
scan-stats: 1h
# you can set multiple anchor files
anchors:
- /mnt/unionfs/.anchors/cloud.anchor
- /mnt/unionfs/.anchors/local.anchor
# Optionally, protect your webhooks with authentication
authentication:
username: hello
password: general
# port for Autoscan webhooks to listen on
port: 3030
triggers:
# The manual trigger is always enabled, the config only adjusts its priority and the rewrite rules.
manual:
priority: 1
rewrite:
sonarr:
# name of sonarr in portainer.
- name: sonarr
priority: 2
# name of sonarr4k in portainer.
- name: sonarr4k
priority: 3
radarr:
# name of radarr in portainer
- name: radarr
priority: 2
# name of radarr4k in portainer
- name: radarr4k
priority: 3
targets:
plex:
# plex url
- url: http://plex:32400
# plex API key
token: {{plex_auth_token}}

View File

@@ -9,9 +9,9 @@
- name: 'Set Known Facts' - name: 'Set Known Facts'
set_fact: set_fact:
pgrole: 'plexautoscan' pgrole: 'plexautoscan'
intport: '3030' intport: '3468'
extport: '3030' extport: '3468'
image: 'cloudb0x/autoscan:master' image: 'sabrsorensen/alpine-plex_autoscan:1df2c05'
# CORE (MANDATORY) ############################################################ # CORE (MANDATORY) ############################################################
- name: 'Including cron job' - name: 'Including cron job'
@@ -21,7 +21,7 @@
include_tasks: './pastask.yml' include_tasks: './pastask.yml'
# LABELS ###################################################################### # LABELS ######################################################################
- name: 'Adding Traefik for {{pgrole}}' - name: 'Adding Traefik'
set_fact: set_fact:
pg_labels: pg_labels:
traefik.enable: 'true' traefik.enable: 'true'
@@ -38,52 +38,23 @@
traefik.frontend.headers.customResponseHeaders: 'X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex' traefik.frontend.headers.customResponseHeaders: 'X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex'
traefik.frontend.headers.forceSTSHeader: 'true' traefik.frontend.headers.forceSTSHeader: 'true'
## Anchors ###########################################################-07-09-2021
- name: 'Create {{pgrole}} folders'
file: "path={{ item }} state=directory mode=0775 owner=1000 group=1000 recurse=yes"
with_items:
- '/opt/appdata/{{pgrole}}'
- '/mnt/unionfs/.anchors/'
- name: 'Create {{pgrole}} anchors file'
file: "path={{ item }} state=touch mode=0775 owner=1000 group=1000"
with_items:
- '/mnt/unionfs/.anchors/cloud.anchor'
- '/mnt/unionfs/.anchors/local.anchor'
## ConfigFile ###########################################################-07-09-2021
- name: 'Checking for existing {{pgrole}}/config.yml'
stat:
path: /opt/appdata/{{pgrole}}/yml/config.yml
register: confcheck
- name: 'Creating {{pgrole}}/yml/config.yml'
file: "path={{ item }} state=file mode=0775 owner=1000 group=1000 recurse=yes"
with_items:
- '/opt/appdata/{{pgrole}}/yml/config.yml'
ignore_errors: yes
when: confcheck.stat.exists == false
# Volumes ######################################################################
- name: 'Setting {{pgrole}} Volumes' - name: 'Setting {{pgrole}} Volumes'
set_fact: set_fact:
pg_volumes: pg_volumes:
- '/mnt/unionfs/:/data' - '/mnt/unionfs/:/data'
- '/opt/appdata/plexguide:/rclone_config' - '/opt/appdata/plexguide:/rclone_config'
- '/opt/appdata/{{pgrole}}/yml:/config' - '/opt/appdata/{{pgrole}}/config:/config'
- '/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases/:/plexDb' - '/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases/:/plexDb'
- '{{path.stdout}}:{{path.stdout}}' - '{{path.stdout}}:{{path.stdout}}'
- '/etc/localtime:/etc/localtime:ro' - '/etc/localtime:/etc/localtime:ro'
- '/var/run/docker.sock:/var/run/docker.sock' - '/var/run/docker.sock:/var/run/docker.sock'
# Env ######################################################################
- name: 'Setting {{pgrole}} ENV' - name: 'Setting {{pgrole}} ENV'
set_fact: set_fact:
pg_env: pg_env:
PUID: '1000' PUID: '1000'
PGID: '1000' PGID: '1000'
AUTOSCAN_VERBOSITY: '1' DOCKERGID: '999'
# MAIN DEPLOYMENT ############################################################# # MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}' - name: 'Deploying {{pgrole}}'

View File

@@ -7,11 +7,11 @@
path: /opt/pgstage path: /opt/pgstage
register: stat_result register: stat_result
- debug: - debug:
msg: "Pandaura is checking folder exists" msg: "PTS Check for missing pull"
- name: 'Cloning Pandaura Install files' - name: 'Cloning PTS Install files'
git: git:
repo: 'https://github.com/Pandaura/Install' repo: 'https://github.com/MHA-Team/Install'
dest: '/opt/pgstage' dest: '/opt/pgstage'
clone: yes clone: yes
version: 'master' version: 'master'
@@ -23,7 +23,7 @@
path: /opt/pgstage path: /opt/pgstage
register: p register: p
- debug: - debug:
msg: "Path exists" msg: "Path exists and PTS folder are pulled"
when: p.stat.isdir is defined and p.stat.isdir when: p.stat.isdir is defined and p.stat.isdir
- name: Remove .githube folder and .git files - name: Remove .githube folder and .git files

View File

@@ -15,7 +15,7 @@
pgrole: 'pgui' pgrole: 'pgui'
intport: '80' intport: '80'
extport: '8555' extport: '8555'
image: 'hawkinzzz/dngele' image: 'mrdoob/dngele:latest'
# CORE (MANDATORY) ############################################################ # CORE (MANDATORY) ############################################################
- name: 'Including core job' - name: 'Including core job'

View File

@@ -134,7 +134,7 @@ padding: 10px;
</head> </head>
<body text="#FFFFFF"> <body text="#FFFFFF">
<ul class="navigation"> <ul class="navigation">
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li> <li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li> <li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
</ul> </ul>
<div class="image"> <div class="image">

View File

@@ -142,7 +142,7 @@ a:visited {
</head> </head>
<body text="#FFFFFF"> <body text="#FFFFFF">
<ul class="navigation"> <ul class="navigation">
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li> <li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li> <li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
</ul> </ul>
<div class="image"> <div class="image">

View File

@@ -109,11 +109,11 @@ while true; do
fi fi
##### Warning for Ports Open with Traefik Deployed ##### Warning for Ports Open with Traefik Deployed
if [[ $(cat /var/plexguide/pg.ports) != "Closed" && $(docker ps --format '{{.Names}}' | grep "traefik") == "traefik" ]]; then if [[ $(cat /var/plexguide/pg.ports) != "Closed" && $(docker ps --format '{{.Names}}' | grep "traefik") == "traefik" ]]; then
echo "Warning: Traefik has been deployed with ports open! Server is at risk for exploitation!" >/opt/appdata/plexguide/emergency/message.a echo "Warning: Traefik deployed with ports open! Server at risk for explotation!" >/opt/appdata/plexguide/emergency/message.a
elif [[ -e "/opt/appdata/plexguide/emergency/message.a" ]]; then rm -rf /opt/appdata/plexguide/emergency/message.a; fi elif [[ -e "/opt/appdata/plexguide/emergency/message.a" ]]; then rm -rf /opt/appdata/plexguide/emergency/message.a; fi
if [[ $(cat /var/plexguide/pg.ports) == "Closed" && $(docker ps --format '{{.Names}}' | grep "traefik") == "" ]]; then if [[ $(cat /var/plexguide/pg.ports) == "Closed" && $(docker ps --format '{{.Names}}' | grep "traefik") == "" ]]; then
echo "Warning: Apps cannot be accessed! Ports are closed & Traefik is not deployed! Either deploy Traefik or open your ports (which is worst for security)" >/opt/appdata/plexguide/emergency/message.b echo "Warning: Apps Cannot Be Accessed! Ports are Closed & Traefik is not enabled! Either deploy traefik or open your ports (which is worst for security)" >/opt/appdata/plexguide/emergency/message.b
elif [[ -e "/opt/appdata/plexguide/emergency/message.b" ]]; then rm -rf /opt/appdata/plexguide/emergency/message.b; fi elif [[ -e "/opt/appdata/plexguide/emergency/message.b" ]]; then rm -rf /opt/appdata/plexguide/emergency/message.b; fi
##### Warning for Bad Traefik Deployment - message.c is tied to traefik showing a status! Do not change unless you know what your doing ##### Warning for Bad Traefik Deployment - message.c is tied to traefik showing a status! Do not change unless you know what your doing
touch /opt/appdata/plexguide/traefik.check touch /opt/appdata/plexguide/traefik.check
@@ -124,7 +124,7 @@ while true; do
fi fi
wget -q "https://${cname}.${domain}" -O "/opt/appdata/plexguide/traefik.check" wget -q "https://${cname}.${domain}" -O "/opt/appdata/plexguide/traefik.check"
if [[ $(cat /opt/appdata/plexguide/traefik.check) == "" && $(docker ps --format '{{.Names}}' | grep "traefik" ) == "traefik" ]]; then if [[ $(cat /opt/appdata/plexguide/traefik.check) == "" && $(docker ps --format '{{.Names}}' | grep "traefik" ) == "traefik" ]]; then
echo "Traefik is not deployed properly! Cannot Reach the Portainer SubDomain!" >/opt/appdata/plexguide/emergency/message.c echo "Traefik is Not Deployed Properly! Cannot Reach the Portainer SubDomain!" >/opt/appdata/plexguide/emergency/message.c
else else
if [[ -e "/opt/appdata/plexguide/emergency/message.c" ]]; then if [[ -e "/opt/appdata/plexguide/emergency/message.c" ]]; then
rm -rf /opt/appdata/plexguide/emergency/message.c rm -rf /opt/appdata/plexguide/emergency/message.c
@@ -132,7 +132,7 @@ while true; do
fi fi
##### Warning for Traefik Rate Limit Exceeded ##### Warning for Traefik Rate Limit Exceeded
if [[ $(cat /opt/appdata/plexguide/traefik.check) == "" && $(docker logs traefik | grep "rateLimited") != "" ]]; then if [[ $(cat /opt/appdata/plexguide/traefik.check) == "" && $(docker logs traefik | grep "rateLimited") != "" ]]; then
echo "$domain's rated limited exceed | Traefik (LetsEncrypt)! Takes up to one week to clear up (or use a new domain)" >/opt/appdata/plexguide/emergency/message.d echo "$domain's rated limited exceed | Traefik (LetsEncrypt)! Takes upto one week to clear up (or use a new domain)" >/opt/appdata/plexguide/emergency/message.d
else else
if [[ -e "/opt/appdata/plexguide/emergency/message.d" ]]; then if [[ -e "/opt/appdata/plexguide/emergency/message.d" ]]; then
rm -rf /opt/appdata/plexguide/emergency/message.d rm -rf /opt/appdata/plexguide/emergency/message.d

View File

@@ -134,7 +134,7 @@ padding: 10px;
</head> </head>
<body text="#FFFFFF"> <body text="#FFFFFF">
<ul class="navigation"> <ul class="navigation">
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li> <li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li> <li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
</ul> </ul>
<div class="image"> <div class="image">

View File

@@ -142,7 +142,7 @@ a:visited {
</head> </head>
<body text="#FFFFFF"> <body text="#FFFFFF">
<ul class="navigation"> <ul class="navigation">
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li> <li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li> <li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
</ul> </ul>
<div class="image"> <div class="image">

View File

@@ -134,7 +134,7 @@ padding: 10px;
</head> </head>
<body text="#FFFFFF"> <body text="#FFFFFF">
<ul class="navigation"> <ul class="navigation">
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li> <li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li> <li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
</ul> </ul>
<div class="image"> <div class="image">

View File

@@ -4,153 +4,146 @@
# Author(s): Admin9705 # Author(s): Admin9705
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
declare YELLOW='\033[0;33m'
declare NC='\033[0m'
declare total_size_in_bytes=0
declare total_program=0
declare program_number=0
runningcheck() { runningcheck() {
initial2 initial2
runcheck5=$(docker ps | grep ${program_var}) runcheck5=$(docker ps | grep ${program_var})
if [[ "$runcheck5" != "" ]]; then running=1; else running=0; fi if [[ "$runcheck5" != "" ]]; then running=1; else running=0; fi
} }
initial() { initial() {
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1 rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
rm -rf /var/plexguide/pgvault.buildup 1>/dev/null 2>&1 rm -rf /var/plexguide/pgvault.buildup 1>/dev/null 2>&1
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1 rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1 rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1 rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
touch /var/plexguide/pgvault.output touch /var/plexguide/pgvault.output
touch /var/plexguide/program.temp touch /var/plexguide/program.temp
touch /var/plexguide/app.list touch /var/plexguide/app.list
touch /var/plexguide/pgvault.buildup touch /var/plexguide/pgvault.buildup
touch /var/plexguide/pgvault.output touch /var/plexguide/pgvault.output
touch /var/plexguide/rclone.size touch /var/plexguide/rclone.size
space=$(cat /var/plexguide/data.location) space=$(cat /var/plexguide/data.location)
# To Get Used Space # To Get Used Space
used=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $3}') used=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $3}')
# To Get All Space # To Get All Space
capacity=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $2}') capacity=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $2}')
# Percentage # Percentage
percentage=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $5}') percentage=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $5}')
} }
initial2() { initial2() {
path=$(cat /var/plexguide/server.hd.path) path=$(cat /var/plexguide/server.hd.path)
tarlocation=$(cat /var/plexguide/data.location) tarlocation=$(cat /var/plexguide/data.location)
program_size=$(cat /var/plexguide/rclone.size) program_size=$(cat /var/plexguide/rclone.size)
program_var=$(cat /tmp/program_var) program_var=$(cat /tmp/program_var)
server_id=$(cat /var/plexguide/server.id) server_id=$(cat /var/plexguide/server.id)
} }
final() { final() {
total_size_readable=$(numfmt --to=iec --suffix=B $total_size_in_bytes) echo
echo echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "All backup complete"$'\t\t\t'"${total_size_readable}" read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
read -p '' typed </dev/tty echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
bash /opt/plexguide/menu/pgvault/pgvault.sh bash /opt/pgvault/pgvault.sh
exit exit
} }
queued() { queued() {
echo echo
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
clear_lines 2
} }
badserver() { badserver() {
echo echo
read -p '⛔️ ERROR - Type an Exact Server Name | Press [ENTER] ' typed </dev/tty read -p '⛔️ ERROR - Type an Exact Server Name | Press [ENTER] ' typed </dev/tty
clear_lines 2
} }
#not used yet #not used yet
rclonelist() { rclonelist() {
ls -l /mnt/gdrive/plexguide/backup | grep "^d" | awk '{print $9}' >pgvault.serverlist ls -l /mnt/gdrive/plexguide/backup | grep "^d" | awk '{print $9}' >pgvault.serverlist
} }
pgboxrecall() { pgboxrecall() {
ls -p /opt/coreapps/apps | grep -v / >/var/plexguide/pgvault.apprecall ls -p /opt/coreapps/apps | grep -v / >/var/plexguide/pgvault.apprecall
while read p; do while read p; do
sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall
done </opt/plexguide/menu/pgvault/exempt.list done </opt/pgvault/exempt.list
while read p; do while read p; do
sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall
basename "$p" .yml >>/var/plexguide/pgvault.apprecall basename "$p" .yml >>/var/plexguide/pgvault.apprecall
done </var/plexguide/pgvault.apprecall done </var/plexguide/pgvault.apprecall
} }
mathprime() { mathprime() {
### List Out Apps In Readable Order (One's Not Installed) ### List Out Apps In Readable Order (One's Not Installed)
num=0 num=0
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1 rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
while read p; do while read p; do
echo -n $p >>/var/plexguide/program.temp echo -n $p >>/var/plexguide/program.temp
echo -n " " >>/var/plexguide/program.temp echo -n " " >>/var/plexguide/program.temp
num=$((num + 1)) num=$((num + 1))
if [ "$num" == 7 ]; then if [ "$num" == 7 ]; then
num=0 num=0
echo " " >>/var/plexguide/program.temp echo " " >>/var/plexguide/program.temp
fi fi
done </var/plexguide/pgvault.apprecall done </var/plexguide/pgvault.apprecall
} }
################################################ FOR BACKUP - START ################################################ FOR BACKUP - START
apprecall() { apprecall() {
tree -d -L 1 /opt/appdata | awk '{print $2}' | tail -n +2 | head -n -2 >/var/plexguide/pgvault.apprecall tree -d -L 1 /opt/appdata | awk '{print $2}' | tail -n +2 | head -n -2 >/var/plexguide/pgvault.apprecall
while read p; do while read p; do
sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall
done </opt/plexguide/menu/pgvault/exempt.list done </opt/pgvault/exempt.list
### Blank Out Temp List ### Blank Out Temp List
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
mathprime mathprime
} }
buildup() { buildup() {
echo "$typed" >>/var/plexguide/pgvault.buildup echo "$typed" >>/var/plexguide/pgvault.buildup
sed -i "/^$typed\b/Id" /var/plexguide/pgvault.apprecall sed -i "/^$typed\b/Id" /var/plexguide/pgvault.apprecall
num=0 num=0
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1 rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
while read p; do while read p; do
echo -n $p >>/var/plexguide/pgvault.output echo -n $p >>/var/plexguide/pgvault.output
echo -n " " >>/var/plexguide/pgvault.output echo -n " " >>/var/plexguide/pgvault.output
if [ "$num" == 7 ]; then if [ "$num" == 7 ]; then
num=0 num=0
echo " " >>/var/plexguide/pgvault.output echo " " >>/var/plexguide/pgvault.output
fi fi
done </var/plexguide/pgvault.buildup done </var/plexguide/pgvault.buildup
mathprime mathprime
vaultbackup vaultbackup
} }
################################################ FOR BACKUP - END ################################################ FOR BACKUP - END
serverprime() { serverprime() {
tree -d -L 1 /mnt/gdrive/plexguide/backup | awk '{print $2}' | tail -n +2 | head -n -2 >/tmp/server.list tree -d -L 1 /mnt/gdrive/plexguide/backup | awk '{print $2}' | tail -n +2 | head -n -2 >/tmp/server.list
### List Out Apps In Readable Order (One's Not Installed) ### List Out Apps In Readable Order (One's Not Installed)
num=0 num=0
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1 rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
while read p; do while read p; do
echo -n $p >>/var/plexguide/program.temp echo -n $p >>/var/plexguide/program.temp
echo -n " " >>/var/plexguide/program.temp echo -n " " >>/var/plexguide/program.temp
num=$((num + 1)) num=$((num + 1))
if [ "$num" == 7 ]; then if [ "$num" == 7 ]; then
num=0 num=0
echo " " >>/var/plexguide/program.temp echo " " >>/var/plexguide/program.temp
fi fi
done </tmp/server.list done </tmp/server.list
servers=$(cat /var/plexguide/program.temp) servers=$(cat /var/plexguide/program.temp)
server_id=$(cat /var/plexguide/server.id) server_id=$(cat /var/plexguide/server.id)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Vault ~ Server Recall 🚀 Vault ~ Server Recall
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Current [${server_id}] & Prior Servers Detected: 📂 Current [${server_id}] & Prior Servers Detected:
@@ -160,53 +153,53 @@ $servers
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit [Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🌍 Type Server Name | Press [ENTER]: ' server </dev/tty read -p '🌍 Type Server Name | Press [ENTER]: ' server </dev/tty
clear_lines 12 echo $server >/tmp/server.select
echo $server >/tmp/server.select
if [[ "$server" == "exit" || "$server" == "Exit" || "$server" == "EXIT" || "$server" == "z" || "$server" == "Z" ]]; then exit; fi
if [[ "$server" == "exit" || "$server" == "Exit" || "$server" == "EXIT" || "$server" == "z" || "$server" == "Z" ]]; then exit; fi
current2=$(cat /tmp/server.list | grep "\<$server\>")
current2=$(cat /tmp/server.list | grep "\<$server\>") if [ "$current2" == "" ]; then
if [ "$current2" == "" ]; then badserver
badserver serverprime
serverprime fi
fi
tempserver=$server
tempserver=$server ls -l /mnt/gdrive/plexguide/backup/$tempserver | awk '{print $9}' | tail -n +2 >/var/plexguide/pgvault.restoreapps
ls -l /mnt/gdrive/plexguide/backup/$tempserver | awk '{print $9}' | tail -n +2 >/var/plexguide/pgvault.restoreapps
### Blank Out Temp List
### Blank Out Temp List rm -rf /var/plexguide/pgvault.apprecall 1>/dev/null 2>&1
rm -rf /var/plexguide/pgvault.apprecall 1>/dev/null 2>&1 touch /var/plexguide/pgvault.apprecall
touch /var/plexguide/pgvault.apprecall
while read p; do
while read p; do basename "$p" .tar >>/var/plexguide/pgvault.apprecall
basename "$p" .tar >>/var/plexguide/pgvault.apprecall done </var/plexguide/pgvault.restoreapps
done </var/plexguide/pgvault.restoreapps
### Blank Out Temp List
### Blank Out Temp List rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1 touch /var/plexguide/program.temp
touch /var/plexguide/program.temp mathprime
mathprime
} }
buildup2() { buildup2() {
echo "$typed" >>/var/plexguide/pgvault.buildup echo "$typed" >>/var/plexguide/pgvault.buildup
sed -i "/^$typed\b/Id" /var/plexguide/pgvault.apprecall sed -i "/^$typed\b/Id" /var/plexguide/pgvault.apprecall
num=0 num=0
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1 rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
while read p; do while read p; do
echo -n $p >>/var/plexguide/pgvault.output echo -n $p >>/var/plexguide/pgvault.output
echo -n " " >>/var/plexguide/pgvault.output echo -n " " >>/var/plexguide/pgvault.output
if [ "$num" == 7 ]; then if [ "$num" == 7 ]; then
num=0 num=0
echo " " >>/var/plexguide/pgvault.output echo " " >>/var/plexguide/pgvault.output
fi fi
done </var/plexguide/pgvault.buildup done </var/plexguide/pgvault.buildup
mathprime mathprime
vaultrestore vaultrestore
} }
################################################ FOR RESTORE - START ################################################ FOR RESTORE - START
@@ -215,142 +208,127 @@ buildup2() {
######################################################## START - PG Vault Backup ######################################################## START - PG Vault Backup
backup_all_start() { backup_all_start() {
total_size_in_bytes=0
program_number=0 while read p; do
total_program=$(wc -l < /var/plexguide/pgvault.apprecall) tee <<-EOF
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 Vault backup start..." ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" Vault - Backing Up: $p
line_above=2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
while read p; do
change_line_text $line_above "🚀 Vault is now backing up ${YELLOW}\"$p\"${NC}" EOF
let line_above+=1
let program_number+=1 sleep 2.5
sleep 2.5
# Store Used Program
# Store Used Program echo $p >/tmp/program_var
echo $p >/tmp/program_var # Execute Main Program
# Execute Main Program backup_process
backup_process
sleep 2
sleep 2 done </var/plexguide/pgvault.apprecall
done </var/plexguide/pgvault.apprecall final
final
} }
backup_start() { backup_start() {
total_size_in_bytes=0 while read p; do
program_number=0 tee <<-EOF
total_program=$(wc -l < /var/plexguide/pgvault.buildup)
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
echo "🚀 Vault backup start..." Vault - Backing Up: $p
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
line_above=2
while read p; do EOF
change_line_text $line_above "🚀 Vault is now backing up ${YELLOW}\"$p\"${NC}"
let line_above+=1 sleep 2.5
let program_number+=1
sleep 2.5 # Store Used Program
echo $p >/tmp/program_var
# Store Used Program # Execute Main Program
echo $p >/tmp/program_var backup_process
# Execute Main Program
backup_process sleep 2
done </var/plexguide/pgvault.buildup
sleep 2 final
done </var/plexguide/pgvault.buildup
final
} }
backup_process() { backup_process() {
initial2 initial2
##### Stop Docker Container if Running ##### Stop Docker Container if Running
runningcheck runningcheck
if [[ "$running" == "1" ]]; then if [[ "$running" == "1" ]]; then
echo "↘️ Stopping Docker Container - $program_var" tee <<-EOF
sleep 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
docker stop $program_var 1>/dev/null 2>&1 ↘️ Stopping Docker Container - $program_var
clear_lines 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
fi
EOF
###### Start the Backup Process - Backup Locally First sleep 1
echo "↘️ Zipping Data Locally - $program_var" docker stop $program_var 1>/dev/null 2>&1
fi
path=$(cat /var/plexguide/server.hd.path)
tarlocation=$(cat /var/plexguide/data.location) ###### Start the Backup Process - Backup Locally First
server_id=$(cat /var/plexguide/server.id) tee <<-EOF
tar \ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Zipping Data Locally - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
path=$(cat /var/plexguide/server.hd.path)
tarlocation=$(cat /var/plexguide/data.location)
server_id=$(cat /var/plexguide/server.id)
tar \
--warning=no-file-changed --ignore-failed-read --absolute-names --warning=no-file-removed \ --warning=no-file-changed --ignore-failed-read --absolute-names --warning=no-file-removed \
--exclude-from=/opt/plexguide/menu/pgvault/exclude.list \ --exclude-from=/opt/pgvault/exclude.list \
-C /opt/appdata/${program_var} -cvf ${tarlocation}/${program_var}.tar ./ \ -C /opt/appdata/${program_var} -cvf ${tarlocation}/${program_var}.tar ./
| cut -b1-$(tput cols) | sed -u 'i\\o033[2K' | stdbuf -o0 tr '\n' '\r'; echo
##### Restart Docker Application if was Running Prior
clear_lines 2 if [[ "$running" == "1" ]]; then
tee <<-EOF
##### Restart Docker Application if was Running Prior ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
if [[ "$running" == "1" ]]; then ↘️ Restarting Docker Application - $program_var
echo "↘️ Restarting Docker Application - $program_var" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
sleep 2
docker restart $program_var 1>/dev/null 2>&1 EOF
clear_lines 1 sleep 2
fi docker restart $program_var 1>/dev/null 2>&1
fi
###### Backing Up Files to GDrive
echo "↘️ Sending Zipped Data to Google Drive - $program_var" ###### Backing Up Files to GDrive
tee <<-EOF
useragent="$(cat /var/plexguide/uagent 1>/dev/null 2>&1)"
bwlimit="$(cat /var/plexguide/blitz.bw 1>/dev/null 2>&1)" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Sending Zipped Data to Google Drive - $program_var
vfs_dcs="$(cat /var/plexguide/vfs_dcs 1>/dev/null 2>&1)" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
vfs_mt="$(cat /var/plexguide/vfs_mt 1>/dev/null 2>&1)"
vfs_t="$(cat /var/plexguide/vfs_t 1>/dev/null 2>&1)" EOF
vfs_c="$(cat /var/plexguide/vfs_c 1>/dev/null 2>&1)" useragent="$(cat /var/plexguide/uagent)"
bwlimit="$(cat /var/plexguide/blitz.bw)"
rclone --config /opt/appdata/plexguide/rclone.conf mkdir gdrive:/plexguide/backup/${server_id} 1>/dev/null 2>&1
vfs_dcs="$(cat /var/plexguide/vfs_dcs)"
rclone moveto ${tarlocation}/${program_var}.tar \ vfs_mt="$(cat /var/plexguide/vfs_mt)"
vfs_t="$(cat /var/plexguide/vfs_t)"
vfs_c="$(cat /var/plexguide/vfs_c)"
rclone --config /opt/appdata/plexguide/rclone.conf mkdir gdrive:/plexguide/backup/${server_id} 1>/dev/null 2>&1
rclone moveto ${tarlocation}/${program_var}.tar \
gdrive:/plexguide/backup/${server_id}/${program_var}.tar \ gdrive:/plexguide/backup/${server_id}/${program_var}.tar \
--config /opt/appdata/plexguide/rclone.conf \ --config /opt/appdata/plexguide/rclone.conf \
-v --checksum --stats-one-line --stats 1s --progress \ -v --checksum --stats-one-line --stats 1s --progress \
--tpslimit=10 \ --tpslimit=10 \
--checkers="$vfs_c" \ --checkers="$vfs_c" \
--transfers="$vfs_t" \ --transfers="$vfs_t" \
--no-traverse \ --no-traverse \
--fast-list \ --fast-list \
--bwlimit="$bwlimit" \ --bwlimit="$bwlimit" \
--drive-chunk-size="$vfs_dcs" \ --drive-chunk-size="$vfs_dcs" \
--user-agent="$useragent" 1>/dev/null 2>&1 --user-agent="$useragent"
# Show completed
clear_lines 1
tar_file_size_bytes=$(wc -c < ${tarlocation}/${program_var}.tar)
let total_size_in_bytes+=tar_file_size_bytes
tar_file_size_readable=$(du -h ${tarlocation}/${program_var}.tar | awk '{print $1}')
echo "✅ ${program_var} backup complete"$'\t\t\t'"${tar_file_size_readable}"$'\t'"Backup ${program_number}/${total_program}"
read -p '↘️ Type | PRESS ENTER: ' typed
clear
##### Remove File Incase
rm -rf ${tarlocation}/${program_var}.tar 1>/dev/null 2>&1
}
## Clear output text for n lines (arg $1) ##### Remove File Incase
clear_lines() { rm -rf ${tarlocation}/${program_var}.tar 1>/dev/null 2>&1
for (( i=1; i <= $(($1)); i++ ));do }
tput cuu1
tput el
done
}
## Change text in n lines above (arg $1) with string (arg $2)
change_line_text() {
tput sc
for (( i=1; i <= $(($1)); i++ ));do
tput cuu1
done
tput el
echo -e $2
tput rc
}

View File

@@ -5,13 +5,13 @@
# URL: https://pgblitz.com - http://github.pgblitz.com # URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
source /opt/plexguide/menu/functions/start.sh
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ SETTING: Backup Download Location ↘️ SETTING: Backup Download Location
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Paying attention to your disk space is important! Type the name of your Paying attention to your disk space is important! Type the name of your
location is very important! Keep in mind Pandaura does not format the location is very important! Keep in mind PG does not format the
location for you! location for you!
Examples: Examples:
@@ -19,15 +19,17 @@ Examples:
2. /hd2/spongebob 2. /hd2/spongebob
NOTE: Start with a / and end with no trailing slash! NOTE: Start with a / and end with no trailing slash!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
end_menu_back
# Standby # Standby
read -p 'TYPE the location | Press [ENTER]: ' typed </dev/tty read -p 'TYPE the Location & Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ NOTICE: Checking - $typed's existance. Please standby... ⚠️ NOTICE: Checking - $typed's existance ! Please Standby
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -36,82 +38,83 @@ if [ "$typed" == "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ WARNING! - The ID cannot be blank! ⛔️ WARNING! - The ID Cannot Be Blank!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
bash /opt/plexguide/menu/interface/serverid.sh sleep 3
exit bash /opt/plexguide/menu/interface/serverid.sh
exit
else else
##################################################### TYPED CHECKERS - START ##################################################### TYPED CHECKERS - START
typed2=$typed typed2=$typed
bonehead=no bonehead=no
##### If BONEHEAD forgot to add a / in the beginning, we fix for them ##### If BONEHEAD forgot to add a / in the beginning, we fix for them
initial="$(echo $typed | head -c 1)" initial="$(echo $typed | head -c 1)"
if [ "$initial" != "/" ]; then if [ "$initial" != "/" ]; then
typed="/$typed" typed="/$typed"
bonehead=yes bonehead=yes
fi fi
##### If BONEHEAD added a / at the end, we fix for them ##### If BONEHEAD added a / at the end, we fix for them
initial="${typed: -1}" initial="${typed: -1}"
if [ "$initial" == "/" ]; then if [ "$initial" == "/" ]; then
typed=${typed::-1} typed=${typed::-1}
bonehead=yes bonehead=yes
fi fi
##### Notify User is a Bonehead ##### Notify User is a Bonehead
if [ "$bonehead" == "yes" ]; then if [ "$bonehead" == "yes" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ ALERT! We fixed the typos for you! Yes, you're welcome. ⛔️ ALERT! We fixed the typos for you! Yes, Your Welcome!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You Typed : $typed2 You Typed : $typed2
Changed To: $typed Changed To: $typed
EOF EOF
read -n 1 -s -r -p "Press [ANY KEY] to continue " read -n 1 -s -r -p "Press [ANY KEY] to Continue "
echo "" echo ""
fi fi
#################################################### TYPED CHECKERS - END #################################################### TYPED CHECKERS - END
mkdir "$typed/pgcheck" &>/dev/null mkdir "$typed/pgcheck" &>/dev/null
# Recalls for to check existance # Recalls for to check existance
rcheck=$(ls -la $typed | grep "\<pgcheck\>") rcheck=$(ls -la $typed | grep "\<pgcheck\>")
if [ "$rcheck" == "" ]; then if [ "$rcheck" == "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ WARNING! - This location does not exist! Exiting... (Case senstive) ⛔️ WARNING! - This Location Does Not Exist! Exiting! (Case Senstive)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 4 sleep 4
exit exit
fi fi
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ PASS: Location! Storing the name of the location! ✅️ PASS: Location! Storing the Name of the Location!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
# Prevents From Repeating # Prevents From Repeating
rm -rf $typed/pgcheck rm -rf $typed/pgcheck
sleep 3 sleep 3
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌇 PASS: Process complete! 🌇 PASS: Process Complete!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo "$typed" >/var/plexguide/data.location echo "$typed" >/var/plexguide/data.location
read -n 1 -s -r -p "Press [ANY] Key to Continue " read -n 1 -s -r -p "Press [ANY] Key to Continue "
fi fi

File diff suppressed because it is too large Load Diff

View File

@@ -5,8 +5,8 @@
# URL: https://pgblitz.com - http://github.pgblitz.com # URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
source /opt/plexguide/menu/pgvault/functions.sh source /opt/pgvault/functions.sh
source /opt/plexguide/menu/functions/pgvault.func source /opt/pgvault/pgvault.func
file="/var/plexguide/restore.id" file="/var/plexguide/restore.id"
if [ ! -e "$file" ]; then if [ ! -e "$file" ]; then
echo "[NOT-SET]" >/var/plexguide/restore.id echo "[NOT-SET]" >/var/plexguide/restore.id

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@ touch /var/plexguide/plex.claim
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
} }
start0() { start0() {
@@ -29,7 +29,7 @@ setserver() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PLEX Installer 🌎 PLEX Installer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: DO NOT SELECT LOCAL SYSTEM for a REMOTE SERVER outside of your NOTE: DO NOT SELECT LOCAL SYSTEM for a REMOTE SERVER outside of your
network as in using Hetzner, WholeSale Internet & Etc! network as in using Hetzner, WholeSale Internet & Etc!
@@ -56,7 +56,7 @@ EOF
claim() { claim() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Remote Plex Server - Claim the Plex Server 🌎 Remote Plex Server - Claim the Plex Server
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
To Claim the Plex Server, visit https://www.plex.tv/claim/ and input the To Claim the Plex Server, visit https://www.plex.tv/claim/ and input the
@@ -81,7 +81,7 @@ EOF
updateplexlsio() { updateplexlsio() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Update Plex Server Automatic Update for Linuxserver.io 🌎 Update Plex Server Automatic Update for Linuxserver.io
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] docker: [ 1 ] docker:

View File

@@ -7,30 +7,30 @@
################################################################################ ################################################################################
# FUNCTIONS START ############################################################## # FUNCTIONS START ##############################################################
typed="${typed,,}"
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1 question1
} }
badinput2() { badinput2() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question2 question2
} }
tokenstatus() { tokenstatus() {
ptokendep=$(cat /var/plexguide/plex.token) ptokendep=$(cat /var/plexguide/plex.token)
if [ "$ptokendep" != "" ]; then if [ "$ptokendep" != "" ]; then
PGSELFTEST=$(curl -LI "http://$(hostname -I | awk '{print $1}'):32400/system?X-Plex-Token=$(cat /var/plexguide/plex.token)" -o /dev/null -w '%{http_code}\n' -s) PGSELFTEST=$(curl -LI "http://$(hostname -I | awk '{print $1}'):32400/system?X-Plex-Token=$(cat /var/plexguide/plex.token)" -o /dev/null -w '%{http_code}\n' -s)
if [[ $PGSELFTEST -ge 200 && $PGSELFTEST -le 299 ]]; then if [[ $PGSELFTEST -ge 200 && $PGSELFTEST -le 299 ]]; then
pstatus="✅ DEPLOYED" pstatus="✅ DEPLOYED"
else else
pstatus="❌ DEPLOYED BUT TOKEN FAILED" pstatus="❌ DEPLOYED BUT TOKEN FAILED"
fi fi
else pstatus="⚠️ NOT DEPLOYED"; fi else pstatus="⚠️ NOT DEPLOYED"; fi
} }
# FIRST QUESTION # FIRST QUESTION
@@ -39,7 +39,7 @@ question1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PlexToken Generator 🌎 PlexToken Generator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Token Status : [$pstatus] Token Status : [$pstatus]
@@ -52,38 +52,38 @@ Token Status : [$pstatus]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
echo echo
if [ "${typed}" == "1" ]; then if [ "$typed" == "1" ]; then
read -p 'Enter the PLEX User Name | Press [ENTER]: ' user </dev/tty read -p 'Enter the PLEX User Name | Press [ENTER]: ' user </dev/tty
read -p 'Enter the PLEX User Password | Press [ENTER]: ' pw </dev/tty read -p 'Enter the PLEX User Password | Press [ENTER]: ' pw </dev/tty
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🍖 NOM NOM - Saved Your Information! 🍖 NOM NOM - Saved Your Information!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 3 sleep 3
question2 question2
elif [ "${typed}" == "2" ]; then elif [ "$typed" == "2" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🍖 NOM NOM - Read Your Information! 🍖 NOM NOM - Read Your Information!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 3 sleep 3
tokenexist tokenexist
pw=$(cat /var/plexguide/plex.pw) pw=$(cat /var/plexguide/plex.pw)
user=$(cat /var/plexguide/plex.user) user=$(cat /var/plexguide/plex.user)
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit exit
else badinput; fi else badinput; fi
} }
question2() { question2() {
@@ -106,9 +106,9 @@ User Pass: $pw
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
if [ "$typed" == "1" ]; then if [ "$typed" == "1" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -118,70 +118,70 @@ EOF
NOTE: If the token is bad, this process will repeat again! NOTE: If the token is bad, this process will repeat again!
EOF EOF
sleep 4 sleep 4
question3 question3
elif [ "$typed" == "2" ]; then elif [ "$typed" == "2" ]; then
question1 question1
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit exit
else badinput2; fi else badinput2; fi
} }
question3() { question3() {
echo "$pw" >/var/plexguide/plex.pw echo "$pw" >/var/plexguide/plex.pw
echo "$user" >/var/plexguide/plex.user echo "$user" >/var/plexguide/plex.user
ansible-playbook /opt/plexguide/menu/plex/token.yml ansible-playbook /opt/plexguide/menu/plex/token.yml
token=$(cat /var/plexguide/plex.token) token=$(cat /var/plexguide/plex.token)
if [ "$token" != "" ]; then if [ "$token" != "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ PlexToken Generation Succeeded! ✅️ PlexToken Generation Succeeded!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 4 sleep 4
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PlexToken Generation Failed! PlexToken Generation Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Process will repeat until you succeed or exit! NOTE: Process will repeat until you succeed or exit!
EOF EOF
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
tokenexist(){ tokenexist(){
pw=$(cat /var/plexguide/plex.pw) pw=$(cat /var/plexguide/plex.pw)
user=$(cat /var/plexguide/plex.user) user=$(cat /var/plexguide/plex.user)
ansible-playbook /opt/plexguide/menu/plex/token.yml ansible-playbook /opt/plexguide/menu/plex/token.yml
token=$(cat /var/plexguide/plex.token) token=$(cat /var/plexguide/plex.token)
token=$(cat /var/plexguide/plex.token) token=$(cat /var/plexguide/plex.token)
if [ "$token" != "" ]; then if [ "$token" != "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ PlexToken Generation Succeeded! ✅️ PlexToken Generation Succeeded!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 4 sleep 4
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PlexToken Generation Failed! PlexToken Generation Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Process will repeat until you succeed or exit! NOTE: Process will repeat until you succeed or exit!
EOF EOF
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################

View File

@@ -47,7 +47,7 @@ plexcheck() {
if [[ "$pcheck" == "" ]]; then if [[ "$pcheck" == "" ]]; then
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Plex is Not Installed or Running! Exiting! WARNING! - Plex is Not Installed or Running! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
dontwork dontwork
@@ -64,8 +64,8 @@ token() {
if [[ "$ptoken" != "$X_PLEX_TOKEN" ]]; then if [[ "$ptoken" != "$X_PLEX_TOKEN" ]]; then
printf ' printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! Failed to Generate a Valid Plex Token! WARNING! Failed to Generate a Valid Plex Token!
WARNING! Exiting Deployment! WARNING! Exiting Deployment!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
dontwork dontwork
@@ -79,7 +79,7 @@ echo $X_PLEX_TOKEN >/var/plex_dupe/plex.token
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1 question1
} }
@@ -95,7 +95,7 @@ chk=$(figlet Plex Dupe finder | lolcat )
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Credits 🚀 Plex_AutoScan Credits
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$chk $chk
@@ -132,7 +132,7 @@ status=$(cat /var/plex_dupe/plex.authdel)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex Dupefinder 🚀 Plex Dupefinder
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Set it to AUTO_DELETE [ $status ] Set it to AUTO_DELETE [ $status ]
@@ -172,7 +172,7 @@ remove() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Remove Plex Dupefinder || l3uddz/plex_dupefinder 🚀 Remove Plex Dupefinder || l3uddz/plex_dupefinder
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] - NO [ 1 ] - NO
@@ -200,7 +200,7 @@ deploycheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex Dupefinder Interface || l3uddz/plex_dupefinder 🚀 Plex Dupefinder Interface || l3uddz/plex_dupefinder
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE : Plex Dupefinder are located in /opt/plex_dupefinder NOTE : Plex Dupefinder are located in /opt/plex_dupefinder

View File

@@ -6,18 +6,18 @@
################################################################################ ################################################################################
# FUNCTIONS START ############################################################## # FUNCTIONS START ##############################################################
typed="${typed,,}"
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1 question1
} }
badinput2() { badinput2() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question2 question2
} }
# FIRST QUESTION # FIRST QUESTION
@@ -26,7 +26,7 @@ question1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex User Name Store 🌎 Plex User Name Store
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] - Generate stored details for Plex Dupefinder [1] - Generate stored details for Plex Dupefinder
@@ -35,38 +35,38 @@ question1() {
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
echo echo
if [ "${typed}" == "1" ]; then if [ "$typed" == "1" ]; then
read -p 'Enter the PLEX User Name | Press [ENTER]: ' user </dev/tty read -p 'Enter the PLEX User Name | Press [ENTER]: ' user </dev/tty
read -p 'Enter the PLEX User Pass | Press [ENTER]: ' pw </dev/tty read -p 'Enter the PLEX User Pass | Press [ENTER]: ' pw </dev/tty
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🍖 NOM NOM - Saved Your Information! 🍖 NOM NOM - Saved Your Information!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 3 sleep 3
question2 question2
elif [ "${typed}" == "2" ]; then elif [ "$typed" == "2" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🍖 NOM NOM - Read Your Information! 🍖 NOM NOM - Read Your Information!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 3 sleep 3
question 2 question 2
pw=$(cat /var/plex_dupe/plex.pw) pw=$(cat /var/plex_dupe/plex.pw)
user=$(cat /var/plex_dupe/plex.user) user=$(cat /var/plex_dupe/plex.user)
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit exit
else badinput; fi else badinput; fi
} }
question2() { question2() {
@@ -90,9 +90,9 @@ User Pass: [ $pw ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
if [ "${typed}" == "1" ]; then if [ "$typed" == "1" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -102,42 +102,42 @@ EOF
NOTE: If the token is bad, this process will repeat again! NOTE: If the token is bad, this process will repeat again!
EOF EOF
sleep 4 sleep 4
question3 question3
elif [ "${typed}" == "2" ]; then elif [ "$typed" == "2" ]; then
question1 question1
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit exit
else badinput2; fi else badinput2; fi
} }
question3() { question3() {
echo "$pw" >/var/plex_dupe/plex.pw echo "$pw" >/var/plex_dupe/plex.pw
echo "$user" >/var/plex_dupe/plex.user echo "$user" >/var/plex_dupe/plex.user
bash /opt/plexguide/menu/plex_dupe/scripts/plex_token.sh bash /opt/plexguide/menu/plex_dupe/scripts/plex_token.sh
token=$(cat /var/plex_dupe/plex.token) token=$(cat /var/plex_dupe/plex.token)
if [ "$token" != "" ]; then if [ "$token" != "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ Details stored Succeeded! ✅️ Details stored Succeeded!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 4 sleep 4
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Details Failed! Details Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Process will repeat until you succeed or exit! NOTE: Process will repeat until you succeed or exit!
EOF EOF
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
question1 question1

View File

@@ -37,7 +37,7 @@ plexcheck() {
if [ "$pcheck" == "" ]; then if [ "$pcheck" == "" ]; then
printf' printf'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Plex is Not Installed or Running! Exiting! WARNING! - Plex is Not Installed or Running! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
' '
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
@@ -65,7 +65,7 @@ bash /opt/plexguide/menu/plexpatrol/token.sh && clear
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1 question1
} }
@@ -73,7 +73,7 @@ selection1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Instantly Kick Video Transcodes? 🚀 Instantly Kick Video Transcodes?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] False [1] False
@@ -93,7 +93,7 @@ selection2() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Instantly Kick 4k - Video Transcodes? 🚀 Instantly Kick 4k - Video Transcodes?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] False [1] False
@@ -113,7 +113,7 @@ selection3() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Instantly Kick Audio Transcodes? 🚀 Instantly Kick Audio Transcodes?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] False [1] False
@@ -133,7 +133,7 @@ selection4() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Limit Amount of Different IPs a User Can Make? 🚀 Limit Amount of Different IPs a User Can Make?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Set a Number from [ 1 ] - [ 10 ] Set a Number from [ 1 ] - [ 10 ]
@@ -149,7 +149,7 @@ selection5() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Limit How Long a User Can Pause For! 🚀 Limit How Long a User Can Pause For!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Set a Number from [ 5 ] - [ 120 ] Mintues Set a Number from [ 5 ] - [ 120 ] Mintues
@@ -165,7 +165,7 @@ selection6() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Check Interval # how often to check the active streams in seconds 🚀 Check Interval # how often to check the active streams in seconds
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Set a Number from [ 60 ] - [ 240 ] seconds Set a Number from [ 60 ] - [ 240 ] seconds
@@ -181,7 +181,7 @@ selection7() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Remove Plex Patrol || l3uddz/plex_patrol 🚀 Remove Plex Patrol || l3uddz/plex_patrol
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] - NO [ 1 ] - NO
@@ -205,7 +205,7 @@ chk=$(figlet Plex Patrol | lolcat )
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex Patrol Credits 🚀 Plex Patrol Credits
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$chk $chk
@@ -241,7 +241,7 @@ deploycheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex - Patrol Interface || l3uddz/plex_patrol 🚀 Plex - Patrol Interface || l3uddz/plex_patrol
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Plex Token [ $pstatus ] Plex Token [ $pstatus ]

View File

@@ -7,48 +7,48 @@
################################################################################ ################################################################################
# FUNCTIONS START ############################################################## # FUNCTIONS START ##############################################################
typed="${typed,,}"
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1 question1
} }
badinput2() { badinput2() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question2 question2
} }
question1() { question1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PlexToken Generator 🌎 PlexToken Generator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Generate new Token for Plex Patrol Generate new Token for Plex Patrol
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ PRESS [ENTER] ' typed </dev/tty read -p '↘️ PRESS [ENTER] ' typed </dev/tty
case ${typed} in case $typed in
*) *)
read -p 'Enter the PLEX User Name | Press [ENTER]: ' user </dev/tty read -p 'Enter the PLEX User Name | Press [ENTER]: ' user </dev/tty
read -p 'Enter the PLEX User Password | Press [ENTER]: ' pw </dev/tty read -p 'Enter the PLEX User Password | Press [ENTER]: ' pw </dev/tty
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🍖 NOM NOM - Saved Your Information! 🍖 NOM NOM - Saved Your Information!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 3 sleep 3
question2 question2
;; ;;
esac esac
} }
question2() { question2() {
@@ -71,9 +71,9 @@ User Pass: $pw
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
if [ "${typed}" == "1" ]; then if [ "$typed" == "1" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -83,22 +83,22 @@ EOF
NOTE: If the token is bad, this process will repeat again! NOTE: If the token is bad, this process will repeat again!
EOF EOF
sleep 4 sleep 4
question3 question3
elif [ "${typed}" == "2" ]; then elif [ "$typed" == "2" ]; then
question1 question1
elif [[ "${typed}" == "z" ]]; then elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit exit
else badinput2; fi else badinput2; fi
} }
question3() { question3() {
echo "$pw" >/var/plexguide/plexpatrol/plex.pw echo "$pw" >/var/plexguide/plexpatrol/plex.pw
echo "$user" >/var/plexguide/plexpatrol/plex.user echo "$user" >/var/plexguide/plexpatrol/plex.user
PLEX_LOGIN=$(cat /var/plexguide/plexpatrol/plex.user) PLEX_LOGIN=$(cat /var/plexguide/plexpatrol/plex.user)
PLEX_PASSWORD=$(cat /var/plexguide/plexpatrol/plex.pw) PLEX_PASSWORD=$(cat /var/plexguide/plexpatrol/plex.pw)
curl -qu "${PLEX_LOGIN}":"${PLEX_PASSWORD}" 'https://plex.tv/users/sign_in.xml' \ curl -qu "${PLEX_LOGIN}":"${PLEX_PASSWORD}" 'https://plex.tv/users/sign_in.xml' \
-X POST -H 'X-Plex-Device-Name: PlexMediaServer' \ -X POST -H 'X-Plex-Device-Name: PlexMediaServer' \
-H 'X-Plex-Provides: server' \ -H 'X-Plex-Provides: server' \
-H 'X-Plex-Version: 0.9' \ -H 'X-Plex-Version: 0.9' \
@@ -107,37 +107,37 @@ question3() {
-H 'X-Plex-Product: Plex Media Server'\ -H 'X-Plex-Product: Plex Media Server'\
-H 'X-Plex-Device: Linux'\ -H 'X-Plex-Device: Linux'\
-H 'X-Plex-Client-Identifier: XXXX' --compressed >/tmp/plex_sign_in -H 'X-Plex-Client-Identifier: XXXX' --compressed >/tmp/plex_sign_in
X_PLEX_TOKEN=$(sed -n 's/.*<authentication-token>\(.*\)<\/authentication-token>.*/\1/p' /tmp/plex_sign_in) X_PLEX_TOKEN=$(sed -n 's/.*<authentication-token>\(.*\)<\/authentication-token>.*/\1/p' /tmp/plex_sign_in)
if [ -z "$X_PLEX_TOKEN" ]; then if [ -z "$X_PLEX_TOKEN" ]; then
cat /tmp/plex_sign_in cat /tmp/plex_sign_in
rm -f /tmp/plex_sign_in rm -f /tmp/plex_sign_in
>&2 echo 'Failed to retrieve the X-Plex-Token.' >&2 echo 'Failed to retrieve the X-Plex-Token.'
exit 1 exit 1
fi fi
echo $X_PLEX_TOKEN >/var/plexguide/plexpatrol/plex.token echo $X_PLEX_TOKEN >/var/plexguide/plexpatrol/plex.token
token=$(cat /var/plexguide/plexpatrol/plex.token) token=$(cat /var/plexguide/plexpatrol/plex.token)
if [ "$token" != "" ]; then if [ "$token" != "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ PlexToken Generation Succeeded! ✅️ PlexToken Generation Succeeded!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 4 sleep 4
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PlexToken Generation Failed! PlexToken Generation Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Process will repeat until you succeed or exit! NOTE: Process will repeat until you succeed or exit!
EOF EOF
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################

View File

@@ -15,7 +15,7 @@ mkdir -p /opt/appdata/plexguide/cron
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
} }
@@ -28,19 +28,19 @@ question1() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Welcome to PortGuard 🤖 Welcome to PortGuard!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Ports are currently: [$guard] Ports Are Currently: [$guard]
[1] $opp ports [ 1 ] $opp Ports
[Z] Exit [ Z ] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) 1)

View File

@@ -22,17 +22,17 @@ count=$(wc -l </var/plexguide/container.running)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PortGuard - Rebuilding containers ⚠️ PortGuard - Rebuilding Containers!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1 sleep 2
for ((i = 1; i < $count + 1; i++)); do for ((i = 1; i < $count + 1; i++)); do
app=$(sed "${i}q;d" /var/plexguide/container.running) app=$(sed "${i}q;d" /var/plexguide/container.running)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PortGuard - Rebuilding [$app] ↘️ PortGuard - Rebuilding [$app]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
@@ -47,8 +47,8 @@ done
echo "" echo ""
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PortGuard - All containers are rebuilt ✔️ ✅️ PortGuard - All Containers Rebuilt!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Continue | Press [ENTER] ' name </dev/tty read -p 'Continue? | Press [ENTER] ' name </dev/tty

View File

@@ -6,10 +6,6 @@
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
# Create Variables (If New) & Recall # Create Variables (If New) & Recall
source /opt/plexguide/menu/functions/start.sh
source /opt/plexguide/menu/functions/pgvault.func
typed="${typed,,}"
pcloadletter() { pcloadletter() {
filevg="/var/plexguide" filevg="/var/plexguide"
touch $filevg/pgclone.transport touch $filevg/pgclone.transport
@@ -43,7 +39,7 @@ primestart() {
wisword=$(/usr/games/fortune -as | sed "s/^/ /") wisword=$(/usr/games/fortune -as | sed "s/^/ /")
varstart() { varstart() {
###################### FOR VARIABLES ROLE SO DOESNT CREATE RED - START ###################### FOR VARIABLS ROLE SO DOESNT CREATE RED - START
filevg="/var/plexguide" filevg="/var/plexguide"
if [ ! -e "$filevg" ]; then if [ ! -e "$filevg" ]; then
mkdir -p $filevg/logs 1>/dev/null 2>&1 mkdir -p $filevg/logs 1>/dev/null 2>&1
@@ -57,7 +53,7 @@ varstart() {
chmod -R 775 $fileag 1>/dev/null 2>&1 chmod -R 775 $fileag 1>/dev/null 2>&1
fi fi
###################### FOR VARIABLES ROLE SO DOESNT CREATE RED - START ###################### FOR VARIABLS ROLE SO DOESNT CREATE RED - START
variable $filevg/pgfork.project "NOT-SET" variable $filevg/pgfork.project "NOT-SET"
variable $filevg/pgfork.version "NOT-SET" variable $filevg/pgfork.version "NOT-SET"
variable $filevg/tld.program "NOT-SET" variable $filevg/tld.program "NOT-SET"
@@ -70,7 +66,6 @@ varstart() {
variable $filevg/transcode.path "standard" variable $filevg/transcode.path "standard"
variable $filevg/pgclone.transport "NOT-SET" variable $filevg/pgclone.transport "NOT-SET"
variable $filevg/plex.claim "" variable $filevg/plex.claim ""
variable $filevg/auto.update "NOT-SET"
#### Temp Fix - Fixes Bugged AppGuard #### Temp Fix - Fixes Bugged AppGuard
serverht=$(cat /var/plexguide/server.ht) serverht=$(cat /var/plexguide/server.ht)
@@ -103,7 +98,7 @@ varstart() {
# For PG UI - Force Variable to Set # For PG UI - Force Variable to Set
ports=$(cat /var/plexguide/server.ports) ports=$(cat /var/plexguide/server.ports)
if [ "$ports" == "" ]; then if [ "$ports" == "" ]; then
echo "Open" >$filevg/pg.ports echo "Open" >$filevg/pg.ports
else echo "Closed" >$filevg/pg.ports; fi else echo "Closed" >$filevg/pg.ports; fi
@@ -158,32 +153,65 @@ menuprime1
else menuprime2; fi else menuprime2; fi
} }
menuprime1() { # GCE Optimised Menu menuprime1() {
transport=$(cat /var/plexguide/pg.transport) transport=$(cat /var/plexguide/pg.transport)
top_menu
disk_space_used_space # Menu Interface
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 $transport | Version: $pgnumber | ID: $serverid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌵 Disk Used Space: $used of $capacity | $percentage Used Capacity
EOF
# Displays Second Drive If GCE
edition=$(cat /var/plexguide/pg.server.deploy)
if [ "$edition" == "feeder" ]; then
used_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $3}')
capacity_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $2}')
percentage_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $5}')
echo " GCE Disk Used Space: $used_gce of $capacity_gce | $percentage_gce Used Capacity"
fi
disktwo=$(cat "/var/plexguide/server.hd.path")
if [ "$edition" != "feeder" ]; then
used_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $3}')
capacity_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $2}')
percentage_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $5}')
if [[ "$disktwo" != "/mnt" ]]; then
echo " 2nd Disk Used Space: $used_gce2 of $capacity_gce2 | $percentage_gce2 Used Capacity"
fi
fi
# Declare Ports State # Declare Ports State
ports=$(cat /var/plexguide/server.ports) ports=$(cat /var/plexguide/server.ports)
if [ "$ports" == "" ]; then if [ "$ports" == "" ]; then
echo "Open" >$filevg/pg.ports ports="OPEN"
else echo "Closed" >$filevg/pg.ports; fi else ports="CLOSED"; fi
tee <<-EOF tee <<-EOF
-- GCE optimized surface -- -- GCE optimized surface --
[1] Traefik : Reverse Proxy | Domain Setup [1] PTS-Traefik : Reverse Proxy
[2] Port Guard : [$ports] Protects the Server App Ports [2] Port Guard : [$ports] Protects the Server App Ports
[3] Authelia : Enable Authelia [3] PTS-Shield : Enable Google's OAuthentication Protection
[4] Mount : Mount Cloud Based Storage [4] PTS-Clone : Mount Transport
[5] Apps : Apps ~ Core, Community & Removal [5] PTS-Apps : Apps
[6] Vault : Backup & Restore [6] PTS-Vault : Backup & Restore
[7] Traktarr : Fill arrs with Trakt lists [7] Traktarr : Fill Sonarr/Radarr over Trakt lists.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
"$wisword"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
end_menu
# Standby # Standby
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) clear && bash /opt/plexguide/menu/pgcloner/traefik.sh && clear && primestart ;; 1) clear && bash /opt/plexguide/menu/pgcloner/traefik.sh && clear && primestart ;;
@@ -191,136 +219,98 @@ end_menu
3) clear && bash /opt/plexguide/menu/shield/pgshield.sh && clear && primestart ;; 3) clear && bash /opt/plexguide/menu/shield/pgshield.sh && clear && primestart ;;
4) clear && bash /opt/plexguide/menu/pgcloner/pgclone.sh && clear && primestart ;; 4) clear && bash /opt/plexguide/menu/pgcloner/pgclone.sh && clear && primestart ;;
5) clear && bash /opt/plexguide/menu/pgbox/select.sh && clear && primestart ;; 5) clear && bash /opt/plexguide/menu/pgbox/select.sh && clear && primestart ;;
6) clear && bash /opt/plexguide/menu/pgvault/pgvault.sh && clear && primestart ;; 6) clear && bash /opt/plexguide/menu/pgcloner/pgvault.sh && clear && primestart ;;
7) clear && bash /opt/plexguide/menu/traktarr/traktarr.sh && clear && primestart ;; 7) clear && bash /opt/plexguide/menu/traktarr/traktarr.sh && clear && primestart ;;
z) clear && bash /opt/plexguide/menu/interface/ending.sh && exit ;; z) clear && bash /opt/plexguide/menu/interface/ending.sh && exit ;;
Z) clear && bash /opt/plexguide/menu/interface/ending.sh && exit ;; Z) clear && bash /opt/plexguide/menu/interface/ending.sh && exit ;;
*) primestart ;; *) primestart ;;
esac esac
} }
networking() {
top_menu
sub_menu_networking
end_menu
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgcloner/traefik.sh; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
main_menu_options
} menuprime2() {
security() {
top_menu
sub_menu_security
end_menu
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/shield/pgshield.sh; fi
if [[ "${typed}" == "d" ]]; then clear && bash /opt/plexguide/menu/portguard/portguard.sh; fi
if [[ "${typed}" == "c" ]]; then clear && bash /opt/plexguide/menu/pgbox/core/core.sh; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
main_menu_options
}
mount() {
top_menu
sub_menu_mount
end_menu
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgcloner/pgclone.sh && clear && primestart; fi
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/portguard/portguard.sh; fi
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgbox/core/core.sh; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
main_menu_options
}
apps() {
top_menu
sub_menu_app
end_menu
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgbox/core/core.sh; fi
if [[ "${typed}" == "d" ]]; then clear && bash /opt/plexguide/menu/pgbox/community/community.sh; fi
if [[ "${typed}" == "c" ]]; then clear && bash /opt/plexguide/menu/pgbox/personal/personal.sh; fi
if [[ "${typed}" == "r" ]]; then clear && bash /opt/plexguide/menu/pgbox/remove/removal.sh; fi
if [[ "${typed}" == "f" ]]; then clear && bash /opt/plexguide/menu/pgbox/remove/removal.sh; fi
if [[ "${typed}" == "t" ]]; then clear && bash /opt/plexguide/menu/pgbox/customparts/autobackup.sh; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
main_menu_options
}
vault() {
source /opt/plexguide/menu/functions/pgvault.func
top_menu
sub_menu_vault
end_menu
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgvault/pgvault.sh; fi
if [[ "${typed}" == "d" ]]; then clear && backup_all_start; fi
if [[ "${typed}" == "c" ]]; then clear && initial && pgboxrecall && apprecall && vaultrestore; fi
if [[ "${typed}" == "r" ]]; then clear && restore_all_start; fi
if [[ "${typed}" == "f" ]]; then clear && bash /opt/plexguide/menu/pgvault/location.sh; fi
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
main_menu_options
}
menuprime2() { #
#welcome="Welcome to Pandaura. Thanks for being a part of the community"
#firstRun=True
#def writeFile(number):
# global firstRun
# if firstRun:
# print("${welcome}")
# firstRun=False
#print(str(number))
#for i in range(10):
# writeFile(i)
#downloadpg
transport=$(cat /var/plexguide/pg.transport) transport=$(cat /var/plexguide/pg.transport)
top_menu
disk_space_used_space # Menu Interface
main_menu tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 $transport | Version: $pgnumber | ID: $serverid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌵 Disk Used Space: $used of $capacity | $percentage Used Capacity
EOF
# Displays Second Drive If GCE
edition=$(cat /var/plexguide/pg.server.deploy)
if [ "$edition" == "feeder" ]; then
used_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $3}')
capacity_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $2}')
percentage_gce=$(df -h /mnt --local | tail -n +2 | awk '{print $5}')
echo " GCE Disk Used Space: $used_gce of $capacity_gce | $percentage_gce Used Capacity"
fi
disktwo=$(cat "/var/plexguide/server.hd.path")
if [ "$edition" != "feeder" ]; then
used_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $3}')
capacity_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $2}')
percentage_gce2=$(df -h "$disktwo" --local | tail -n +2 | awk '{print $5}')
if [[ "$disktwo" != "/mnt" ]]; then
echo " 2nd Disk Used Space: $used_gce2 of $capacity_gce2 | $percentage_gce2 Used Capacity"
fi
fi
# Declare Ports State # Declare Ports State
ports=$(cat /var/plexguide/server.ports) ports=$(cat /var/plexguide/server.ports)
if [ "$ports" == "" ]; then if [ "$ports" == "" ]; then
ports="🔴 " ports="OPEN"
else ports="🟢"; fi else ports="CLOSED"; fi
#if [[ "${typed}" == "2" ]]; then sub_menu_security; fi tee <<-EOF
end_menu
# Standby
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
[1] PTS-Traefik : Reverse Proxy
[2] Port Guard : [$ports] Protects the Server App Ports
[3] PTS-Shield : Enable Google's OAuthentication Protection
[4] PTS-Clone : Mount Transport
[5] PTS-Apps : Apps ~ Core, Community & Removal
[6] CBOX-PAS : PlexAutoScan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[7] PTS-WordPress : Deploy WordPress Instances
[8] PTS-Vault : Backup & Restore
[9] PTS-Cloud : GCE & Virtual Instances
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[10] CBOX-PDUPE : Find and delete duplicate files in Plex
[11] Traktarr : Fill Sonarr/Radarr over Trakt lists.
[12] Plex Patrol : Kick transcodes (audio or video or both)
[13] Settings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
"$wisword"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Used disk space: $used of $capacity | $percentage used capacity Deployed
EOF EOF
main_menu_options() { # Standby
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) clear && networking;; 1) clear && bash /opt/plexguide/menu/pgcloner/traefik.sh && clear && primestart ;;
2) clear && security && clear && primestart;; 2) clear && bash /opt/plexguide/menu/portguard/portguard.sh && clear && primestart ;;
3) clear && mount && clear && primestart;; 3) clear && bash /opt/plexguide/menu/shield/pgshield.sh && clear && primestart ;;
4) clear && apps && clear && primestart;; 4) clear && bash /opt/plexguide/menu/pgcloner/pgclone.sh && clear && primestart ;;
5) clear && vault && clear && primestart;; 5) clear && bash /opt/plexguide/menu/pgbox/select.sh && clear && primestart ;;
esac 6) clear && bash /opt/plexguide/menu/pgscan/pgscan.sh && clear && primestart ;;
} 7) clear && bash /opt/plexguide/menu/pgcloner/pgpress.sh && clear && primestart ;;
case $typed in 8) clear && bash /opt/plexguide/menu/pgcloner/pgvault.sh && clear && primestart ;;
1) clear && networking && clear && primestart ;; 9) clear && bash /opt/plexguide/menu/interface/cloudselect.sh && clear && primestart ;;
2) clear && security && clear && primestart ;; 10) clear && bash /opt/plexguide/menu/plex_dupe/plex_dupe.sh && clear && primestart ;;
3) clear && mount && clear && primestart;; 11) clear && bash /opt/plexguide/menu/traktarr/traktarr.sh && clear && primestart ;;
4) clear && apps && clear && primestart;; 12) clear && bash /opt/plexguide/menu/plexpatrol/plexpatrol.sh && clear && primestart ;;
5) clear && vault && clear && primestart;; 13) clear && bash /opt/plexguide/menu/interface/settings.sh && clear && primestart ;;
#/opt/plexguide/menu/pgscan/pgscan.sh && clear && primestart ;;
7) clear && bash /opt/plexguide/menu/pgvault/pgvault.sh && clear && primestart ;;
8) clear && bash /opt/plexguide/menu/plex_dupe/plex_dupe.sh && clear && primestart ;;
9) clear && bash /opt/plexguide/menu/traktarr/traktarr.sh && clear && primestart ;;
10) clear && bash /opt/plexguide/menu/plexpatrol/plexpatrol.sh && clear && primestart ;;
0) clear && bash /opt/plexguide/menu/interface/settings.sh && clear && primestart ;;
z) clear && bash /opt/plexguide/menu/interface/ending.sh && exit ;; z) clear && bash /opt/plexguide/menu/interface/ending.sh && exit ;;
Z) clear&& bash /opt/plexguide/menu/interface/ending.sh && exit ;; Z) clear&& bash /opt/plexguide/menu/interface/ending.sh && exit ;;
*) primestart ;; *) primestart ;;
#These options are hidden
13) clear && bash /opt/plexguide/menu/interface/cloudselect.sh && clear && primestart ;;
12) clear && bash /opt/plexguide/menu/pgcloner/pgpress.sh && clear && primestart ;;
esac esac
} }
#bash /opt/plexguide/menu/pgbox/select.sh && clear && primestart ;; this is for apps
primestart primestart

View File

@@ -10,54 +10,54 @@
mkdir -p /var/plexguide/traktarr/ mkdir -p /var/plexguide/traktarr/
# FUNCTIONS START ############################################################## # FUNCTIONS START ##############################################################
typed="${typed,,}"
# FIRST FUNCTION # FIRST FUNCTION
variable() { variable() {
file="$1" file="$1"
if [ ! -e "$file" ]; then echo "$2" >$1; fi if [ ! -e "$file" ]; then echo "$2" >$1; fi
} }
deploycheck() { deploycheck() {
dcheck=$(systemctl is-active traktarr.service) dcheck=$(systemctl is-active traktarr.service)
if [ "$dcheck" == "active" ]; then if [ "$dcheck" == "active" ]; then
dstatus="✅ DEPLOYED" dstatus="✅ DEPLOYED"
else dstatus="⚠️ NOT DEPLOYED"; fi else dstatus="⚠️ NOT DEPLOYED"; fi
} }
sonarrcheck() { sonarrcheck() {
pcheck=$(docker ps --format '{{.Names}}' | grep "sonarr") pcheck=$(docker ps --format '{{.Names}}' | grep "sonarr")
if [ "$pcheck" == "" ]; then if [ "$pcheck" == "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Sonarr is not Installed/Running! Cannot Proceed! WARNING! - Sonarr is not Installed/Running! Cannot Proceed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
radarrcheck() { radarrcheck() {
pcheck=$(docker ps --format '{{.Names}}' | grep "radarr") pcheck=$(docker ps --format '{{.Names}}' | grep "radarr")
if [ "$pcheck" == "" ]; then if [ "$pcheck" == "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Radarr is not Installed/Running! Cannot Proceed! WARNING! - Radarr is not Installed/Running! Cannot Proceed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
squality() { squality() {
sonarrcheck sonarrcheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -80,30 +80,30 @@ HD - 720p/1080p
Go Back? Type > exit Go Back? Type > exit
EOF EOF
read -p '↘️ Type Sonarr Location | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Sonarr Location | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
question1 question1
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ SYSTEM MESSAGE: Sonarr Path Completed! ✅ SYSTEM MESSAGE: Sonarr Path Completed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Quality Set Is: ${typed} Quality Set Is: $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo "${typed}" >/var/plexguide/traktarr/pgtrak.sprofile echo "$typed" >/var/plexguide/traktarr/pgtrak.sprofile
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
rquality() { rquality() {
radarrcheck radarrcheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -126,25 +126,25 @@ HD - 720p/1080p
Go Back? Type > exit Go Back? Type > exit
EOF EOF
read -p '↘️ Type Radarr Location | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Radarr Location | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
question1 question1
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ SYSTEM MESSAGE: Radarr Path Completed! ✅ SYSTEM MESSAGE: Radarr Path Completed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Quality Set Is: ${typed} Quality Set Is: $typed
EOF EOF
echo "${typed}" >/var/plexguide/traktarr/pgtrak.rprofile echo "$typed" >/var/plexguide/traktarr/pgtrak.rprofile
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
api() { api() {
@@ -169,14 +169,14 @@ Go Back? Type > exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty
echo ${typed} >/var/plexguide/traktarr/pgtrak.client echo $typed >/var/plexguide/traktarr/pgtrak.client
read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty
echo ${typed} >/var/plexguide/traktarr/pgtrak.secret echo $typed >/var/plexguide/traktarr/pgtrak.secret
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
question1 question1
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -189,16 +189,16 @@ NOTE: The API Client and Secret is set! Ensure to setup your <paths> and
INFO: Messed up? Rerun this API Interface to update the information! INFO: Messed up? Rerun this API Interface to update the information!
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
spath() { spath() {
hdpath=$(cat /var/plexguide/server.hd.path) hdpath=$(cat /var/plexguide/server.hd.path)
tvfolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'TV*|tv') tvfolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'TV*|tv')
sonarrcheck sonarrcheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📁 Sonarr Path 📁 Sonarr Path
@@ -216,47 +216,47 @@ $tvfolderprint
Go Back? Type > exit Go Back? Type > exit
EOF EOF
read -p '↘️ Type Sonarr Location | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Sonarr Location | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
question1 question1
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking Path $typed 🚀 SYSTEM MESSAGE: Checking Path $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1.5 sleep 1.5
##################################################### TYPED CHECKERS - START ##################################################### TYPED CHECKERS - START
typed2=${typed} typed2=$typed
bonehead=no bonehead=no
##### If user forgot to add a / in the beginning, we fix for them ##### If user forgot to add a / in the beginning, we fix for them
initial="$(echo ${typed} | head -c 1)" initial="$(echo $typed | head -c 1)"
if [ "$initial" != "/" ]; then if [ "$initial" != "/" ]; then
typed="/${typed}" typed="/$typed"
fi fi
##### If user added a / at the end, we fix for them ##### If user added a / at the end, we fix for them
initial="${typed: -1}" initial="${typed: -1}"
if [ "$initial" == "/" ]; then if [ "$initial" == "/" ]; then
typed=${typed::-1} typed=${typed::-1}
fi fi
##################################################### TYPED CHECKERS - START ##################################################### TYPED CHECKERS - START
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking if Location is Valid 🚀 SYSTEM MESSAGE: Checking if Location is Valid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1.5 sleep 1.5
mkdir ${typed}/test 1>/dev/null 2>&1 mkdir $typed/test 1>/dev/null 2>&1
file="${typed}/test" file="$typed/test"
if [ -e "$file" ]; then if [ -e "$file" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -264,22 +264,22 @@ EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
### Removes /mnt if /mnt/unionfs exists ### Removes /mnt if /mnt/unionfs exists
#check=$(echo ${typed} | head -c 12) #check=$(echo $typed | head -c 12)
#if [ "$check" == "/mnt/unionfs" ]; then #if [ "$check" == "/mnt/unionfs" ]; then
#typed=${typed:4} #typed=${typed:4}
#fi #fi
echo "${typed}" >/var/plexguide/traktarr/pgtrak.spath echo "$typed" >/var/plexguide/traktarr/pgtrak.spath
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "" echo ""
question1 question1
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔ ALERT: Path ${typed} DOES NOT Exist! No Changes Made! ⛔ ALERT: Path $typed DOES NOT Exist! No Changes Made!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Note: Exiting the Process! You must ensure that linux is able to READ Note: Exiting the Process! You must ensure that linux is able to READ
your location. your location.
@@ -288,17 +288,17 @@ Advice: Exit PTS and (Test) Type >>> mkdir $typed/testfolder
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "" && question1 echo "" && question1
fi
fi fi
fi
} }
rpath() { rpath() {
hdpath=$(cat /var/plexguide/server.hd.path) hdpath=$(cat /var/plexguide/server.hd.path)
moviefolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'Movi*|movi*') moviefolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'Movi*|movi*')
radarrcheck radarrcheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -318,47 +318,47 @@ $moviefolderprint
Go Back? Type > exit Go Back? Type > exit
EOF EOF
read -p '↘️ Type Radarr Location | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Radarr Location | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
question1 question1
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking Path $typed 🚀 SYSTEM MESSAGE: Checking Path $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1.5 sleep 1.5
##################################################### TYPED CHECKERS - START ##################################################### TYPED CHECKERS - START
typed2=${typed} typed2=$typed
bonehead=no bonehead=no
##### If user forgot to add a / in the beginning, we fix for them ##### If user forgot to add a / in the beginning, we fix for them
initial="$(echo ${typed} | head -c 1)" initial="$(echo $typed | head -c 1)"
if [ "$initial" != "/" ]; then if [ "$initial" != "/" ]; then
typed="/${typed}" typed="/$typed"
fi fi
##### If user added a / at the end, we fix for them ##### If user added a / at the end, we fix for them
initial="${typed: -1}" initial="${typed: -1}"
if [ "$initial" == "/" ]; then if [ "$initial" == "/" ]; then
typed=${typed::-1} typed=${typed::-1}
fi fi
##################################################### TYPED CHECKERS - START ##################################################### TYPED CHECKERS - START
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking if Location is Valid 🚀 SYSTEM MESSAGE: Checking if Location is Valid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
sleep 1.5 sleep 1.5
mkdir ${typed}/test 1>/dev/null 2>&1 mkdir $typed/test 1>/dev/null 2>&1
file="${typed}/test" file="$typed/test"
if [ -e "$file" ]; then if [ -e "$file" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -366,84 +366,84 @@ EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo "${typed}" >/var/plexguide/traktarr/pgtrak.rpath echo "$typed" >/var/plexguide/traktarr/pgtrak.rpath
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "" echo ""
question1 question1
else else
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔ ALERT: Path ${typed} DOES NOT Exist! No Changes Made! ⛔ ALERT: Path $typed DOES NOT Exist! No Changes Made!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Note: Exiting the Process! You must ensure that linux is able to READ Note: Exiting the Process! You must ensure that linux is able to READ
your location. your location.
Advice: Exit PTS and (Test) Type >>> mkdir ${typed}/testfolder Advice: Exit PTS and (Test) Type >>> mkdir $typed/testfolder
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "" && question1 echo "" && question1
fi
fi fi
fi
} }
######################################################################### #########################################################################
####Custom parts ####Custom parts
######################################################################### #########################################################################
maxyear() { maxyear() {
((mnyear=$(date +"%Y")+1)) ((mnyear=$(date +"%Y")+1))
((mxyear=$(date +"%Y")+7)) ((mxyear=$(date +"%Y")+7))
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Limit the maximum allowed year for traktarr 🚀 Limit the maximum allowed year for traktarr
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Set a Year between [ $mnyear ] and [ $mxyear ] Set a Year between [ $mnyear ] and [ $mxyear ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" -ge "$mnyear" && "${typed}" -le "$mxyear" ]]; then if [[ "$typed" -ge "$mnyear" && "$typed" -le "$mxyear" ]]; then
echo "${typed}" >/var/plexguide/traktarr/pgtrakyear.max && question1 echo "$typed" >/var/plexguide/traktarr/pgtrakyear.max && question1
else maxyear ; fi else maxyear ; fi
} }
minyear() { minyear() {
((mnyear=$(date +"%Y")-80)) ((mnyear=$(date +"%Y")-80))
((mxyear=$(date +"%Y")-1)) ((mxyear=$(date +"%Y")-1))
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Limit the minimum allowed year for traktarr 🚀 Limit the minimum allowed year for traktarr
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Set a Year between [ $mnyear ] and [ $mxyear ] Set a Year between [ $mnyear ] and [ $mxyear ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" -ge "$mnyear" && "${typed}" -le "$mxyear" ]]; then if [[ "$typed" -ge "$mnyear" && "$typed" -le "$mxyear" ]]; then
echo "${typed}" >/var/plexguide/traktarr/pgtrakyear.min && question1 echo "$typed" >/var/plexguide/traktarr/pgtrakyear.min && question1
else minyear ; fi else minyear ; fi
} }
lang() { lang() {
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Set language profile for Sonarr 🚀 Set language profile for Sonarr
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Language Profile that TV shows are assigned to. Only applies to Sonarr v3. Language Profile that TV shows are assigned to. Only applies to Sonarr v3.
Note : Note :
you have to write it as it really is, you have to write it as it really is,
if you make a mistake, it will not be checked for conformity! if you make a mistake, it will not be checked for conformity!
the first letter must be large, otherwise it will not work the first letter must be large, otherwise it will not work
@@ -451,43 +451,43 @@ Sample:
English English
German German
France France
Spain Spain
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type your language profile from Sonarr | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type your language profile from Sonarr | Press [ENTER]: ' typed </dev/tty
echo $typed >/var/plexguide/traktarr/pgtrak.lang echo $typed >/var/plexguide/traktarr/pgtrak.lang
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
echo -e "English" /var/plexguide/traktarr/pgtrak.lang echo -e "English" /var/plexguide/traktarr/pgtrak.lang
question1 question1
else else
clear clear
lprofil=$(cat /var/plexguide/traktarr/pgtrak.lang) lprofil=$(cat /var/plexguide/traktarr/pgtrak.lang)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Traktarr Language Profil set ✅ Traktarr Language Profil set
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You have chosen the language profile = $lprofil You have chosen the language profile = $lprofil
If this is wrong now, traktarr will not work 100% If this is wrong now, traktarr will not work 100%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1 question1
fi fi
} }
avbila() { avbila() {
avacbact=$(cat /var/plexguide/traktarr/pgtrak.minimumavailability) avacbact=$(cat /var/plexguide/traktarr/pgtrak.minimumavailability)
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Set minimum availability movies for Radarr 🚀 Set minimum availability movies for Radarr
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The minimum availability for movies are actually set to The minimum availability for movies are actually set to
$avacbact $avacbact
@@ -500,27 +500,27 @@ Choices are announced, in_cinemas, released (Physical/Web), or predb.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in case $typed in
1) echo -e "announced" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;; 1) echo -e "announced" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
2) echo -e "in_cinemas" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;; 2) echo -e "in_cinemas" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
3) echo -e "released" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;; 3) echo -e "released" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
4) echo -e "predb" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;; 4) echo -e "predb" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
z) exit ;; z) exit ;;
Z) exit ;; Z) exit ;;
*) question1 ;; *) question1 ;;
esac esac
} }
################################################################################## ##################################################################################
credits() { credits() {
clear clear
chk=$(figlet traktarr | lolcat ) chk=$(figlet traktarr | lolcat )
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 traktarr Credits 🚀 traktarr Credits
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$chk $chk
@@ -540,19 +540,19 @@ $chk
######################################################################### #########################################################################
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo echo
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
question1 question1
} }
prefill() { prefill() {
clear clear
chk=$(figlet traktarr | lolcat ) chk=$(figlet traktarr | lolcat )
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 traktarr prefilling the system 🚀 traktarr prefilling the system
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Prefilling allowed (Runs a daily job that grabs up to 50 shows and [1] Prefilling allowed (Runs a daily job that grabs up to 50 shows and
@@ -565,32 +565,32 @@ prefill() {
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo echo
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
case $typed in case $typed in
1) ansible-playbook /opt/plexguide/menu/traktarr/traktarr-list/prefillallow.yml && question1 ;; 1) ansible-playbook /opt/plexguide/menu/traktarr/traktarr-list/prefillallow.yml && question1 ;;
2) ansible-playbook /opt/plexguide/menu/traktarr/traktarr-list/prefillremove.yml && question1 ;; 2) ansible-playbook /opt/plexguide/menu/traktarr/traktarr-list/prefillremove.yml && question1 ;;
z) exit ;; z) exit ;;
Z) exit ;; Z) exit ;;
*) question1 ;; *) question1 ;;
esac esac
} }
# BAD INPUT # BAD INPUT
badinput() { badinput() {
echo echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1 question1
} }
endbanner() { endbanner() {
clear clear
chk=$(figlet traktarr | lolcat ) chk=$(figlet traktarr | lolcat )
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 traktarr Commands 🚀 traktarr Commands
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$chk $chk
@@ -604,65 +604,65 @@ Commands:
shows Add multiple shows to Sonarr. shows Add multiple shows to Sonarr.
Args: Args:
-t, --list-type TEXT Trakt list to process. -t, --list-type TEXT Trakt list to process.
For example: For example:
'anticipated', 'trending', 'popular', 'anticipated', 'trending', 'popular',
'person', 'watched', 'played', 'recommended', 'person', 'watched', 'played', 'recommended',
'watchlist', or any URL to a list. [required] 'watchlist', or any URL to a list. [required]
-l, --add-limit INTEGER Limit number of movies added to Radarr. -l, --add-limit INTEGER Limit number of movies added to Radarr.
-d, --add-delay FLOAT Seconds between each add request to Radarr. [default: 2.5] -d, --add-delay FLOAT Seconds between each add request to Radarr. [default: 2.5]
-s, --sort [rating|release|votes] Sort list to process. [default: votes] -s, --sort [rating|release|votes] Sort list to process. [default: votes]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
echo echo
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
question1 question1
} }
##################################################################################################################################### #####################################################################################################################################
checkcase() { checkcase() {
sonarr=$(docker ps --format '{{.Names}}' | grep "sonarr") sonarr=$(docker ps --format '{{.Names}}' | grep "sonarr")
radarr=$(docker ps --format '{{.Names}}' | grep "radarr") radarr=$(docker ps --format '{{.Names}}' | grep "radarr")
if [[ "$radarr" == "" ]] && [[ "$sonarr" == "" ]]; then if [[ "$radarr" == "" ]] && [[ "$sonarr" == "" ]]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Sonarr/Radarr is not Installed/Running! WARNING! - Sonarr/Radarr is not Installed/Running!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
exit 0 exit 0
elif [[ "$sonarr" = "sonarr" ]] && [[ "$radarr" = "" ]]; then elif [[ "$sonarr" = "sonarr" ]] && [[ "$radarr" = "" ]]; then
echo "⛔ WARNING! - Traktarr will only work for shows! Radarr Not Running!" >/var/plexguide/traktarr/docker.status echo "⛔ WARNING! - Traktarr will only work for shows! Radarr Not Running!" >/var/plexguide/traktarr/docker.status
elif [[ "$radarr" = "radarr" ]] && [[ "$sonarr" = "" ]]; then elif [[ "$radarr" = "radarr" ]] && [[ "$sonarr" = "" ]]; then
echo "⛔ WARNING! - Traktarr will only work for movies! Sonarr Not Running!" >/var/plexguide/traktarr/docker.status echo "⛔ WARNING! - Traktarr will only work for movies! Sonarr Not Running!" >/var/plexguide/traktarr/docker.status
else [[ "$radarr" = "radarr" ]] && [[ "$sonarr" = "sonarr" ]] else [[ "$radarr" = "radarr" ]] && [[ "$sonarr" = "sonarr" ]]
echo "🛈 Traktarr - Radarr and Sonarr detected | it will work for both" >/var/plexguide/traktarr/docker.status; fi echo "🚀 Traktarr - Radarr and Sonarr detected | it will work for both" >/var/plexguide/traktarr/docker.status; fi
} }
question1() { question1() {
api=$(cat /var/plexguide/traktarr/pgtrak.secret) api=$(cat /var/plexguide/traktarr/pgtrak.secret)
if [ "$api" == "NOT-SET" ]; then api="NOT-SET"; else api="SET"; fi if [ "$api" == "NOT-SET" ]; then api="NOT-SET"; else api="SET"; fi
rpath=$(cat /var/plexguide/traktarr/pgtrak.rpath) rpath=$(cat /var/plexguide/traktarr/pgtrak.rpath)
spath=$(cat /var/plexguide/traktarr/pgtrak.spath) spath=$(cat /var/plexguide/traktarr/pgtrak.spath)
rprofile=$(cat /var/plexguide/traktarr/pgtrak.rprofile) rprofile=$(cat /var/plexguide/traktarr/pgtrak.rprofile)
sprofile=$(cat /var/plexguide/traktarr/pgtrak.sprofile) sprofile=$(cat /var/plexguide/traktarr/pgtrak.sprofile)
mxyear=$(cat /var/plexguide/traktarr/pgtrakyear.max) mxyear=$(cat /var/plexguide/traktarr/pgtrakyear.max)
mnyear=$(cat /var/plexguide/traktarr/pgtrakyear.min) mnyear=$(cat /var/plexguide/traktarr/pgtrakyear.min)
langprofil=$(cat /var/plexguide/traktarr/pgtrak.lang) langprofil=$(cat /var/plexguide/traktarr/pgtrak.lang)
avmin=$(cat /var/plexguide/traktarr/pgtrak.minimumavailability) avmin=$(cat /var/plexguide/traktarr/pgtrak.minimumavailability)
status=$(cat /var/plexguide/traktarr/docker.status) status=$(cat /var/plexguide/traktarr/docker.status)
deploycheck deploycheck
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Traktarr Interface 🚀 Traktarr Interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$status $status
@@ -690,84 +690,84 @@ NOTE: Changes Made? Must Redeploy Traktarr when Complete!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case ${typed} in case $typed in
1) api && question1 ;; 1) api && question1 ;;
2) spath && question1 ;; 2) spath && question1 ;;
3) rpath && question1 ;; 3) rpath && question1 ;;
4) squality && question1 ;; 4) squality && question1 ;;
5) rquality && question1 ;; 5) rquality && question1 ;;
6) maxyear && question1 ;; 6) maxyear && question1 ;;
7) minyear && question1 ;; 7) minyear && question1 ;;
8) lang && question1 ;; 8) lang && question1 ;;
9) avbila && question1 ;; 9) avbila && question1 ;;
10) 10)
sonarr=$(docker ps --format '{{.Names}}' | grep "sonarr") sonarr=$(docker ps --format '{{.Names}}' | grep "sonarr")
radarr=$(docker ps --format '{{.Names}}' | grep "radarr") radarr=$(docker ps --format '{{.Names}}' | grep "radarr")
if [ "$radarr" == "" ] && [ "$sonarr" == "" ]; then if [ "$radarr" == "" ] && [ "$sonarr" == "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Sonarr or Radarr must be Running! WARNING! - Sonarr or Radarr must be Running!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1 question1
else else
if [ "$sonarr" = "sonarr" ] && [ "$radarr" = "" ]; then if [ "$sonarr" = "sonarr" ] && [ "$radarr" = "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Traktarr will only work for shows! Radarr Not Running! WARNING! - Traktarr will only work for shows! Radarr Not Running!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi fi
if [ "$radarr" = "radarr" ] && [ "$sonarr" = "" ]; then if [ "$radarr" = "radarr" ] && [ "$sonarr" = "" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Traktarr will only work for movies! Sonarr Not Running! WARNING! - Traktarr will only work for movies! Sonarr Not Running!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi fi
if [ "$radarr" = "radarr" ] && [ "$sonarr" = "sonarr" ]; then if [ "$radarr" = "radarr" ] && [ "$sonarr" = "sonarr" ]; then
tee <<-EOF tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Traktarr - Radarr and Sonarr detected | it will work for both 🚀 Traktarr - Radarr and Sonarr detected | it will work for both
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi fi
file="/opt/appdata/radarr/config.xml" file="/opt/appdata/radarr/config.xml"
if [ -e "$file" ]; then if [ -e "$file" ]; then
info=$(cat /opt/appdata/radarr/config.xml) info=$(cat /opt/appdata/radarr/config.xml)
info=${info#*<ApiKey>} 1>/dev/null 2>&1 info=${info#*<ApiKey>} 1>/dev/null 2>&1
info1=$(echo ${info:0:32}) 1>/dev/null 2>&1 info1=$(echo ${info:0:32}) 1>/dev/null 2>&1
echo "$info1" >/var/plexguide/traktarr/pgtrak.rapi echo "$info1" >/var/plexguide/traktarr/pgtrak.rapi
fi fi
file="/opt/appdata/sonarr/config.xml" file="/opt/appdata/sonarr/config.xml"
if [ -e "$file" ]; then if [ -e "$file" ]; then
info=$(cat /opt/appdata/sonarr/config.xml) info=$(cat /opt/appdata/sonarr/config.xml)
info=${info#*<ApiKey>} 1>/dev/null 2>&1 info=${info#*<ApiKey>} 1>/dev/null 2>&1
info2=$(echo ${info:0:32}) 1>/dev/null 2>&1 info2=$(echo ${info:0:32}) 1>/dev/null 2>&1
echo "$info2" >/var/plexguide/traktarr/pgtrak.sapi echo "$info2" >/var/plexguide/traktarr/pgtrak.sapi
fi fi
fi fi
ansible-playbook /opt/plexguide/menu/pg.yml --tags traktarr && question1 ;; ansible-playbook /opt/plexguide/menu/pg.yml --tags traktarr && question1 ;;
11) prefill && clear && question1 ;; 11) prefill && clear && question1 ;;
12) endbanner && clear && question1 ;; 12) endbanner && clear && question1 ;;
C) credits && clear && question1 ;; C) credits && clear && question1 ;;
c) credits && clear && question1 ;; c) credits && clear && question1 ;;
z) exit ;; z) exit ;;
Z) exit ;; Z) exit ;;
*) question1 ;; *) question1 ;;
esac esac
} }
# FUNCTIONS END ############################################################## # FUNCTIONS END ##############################################################

View File

@@ -5,175 +5,14 @@
# URL: https://pgblitz.com - http://github.pgblitz.com # URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
program=$(cat /tmp/program_var) mainstart() {
cname=$program mkdir -p /opt/ptsupdate 1>/dev/null 2>&1
git clone --single-branch https://github.com/MHA-Team/PTS-Update.git /opt/ptsupdate 1>/dev/null 2>&1
if [[ -f "/var/plexguide/$program.cname" ]]; then chown -cR 100:1000 /opt/ptsupdate 1>/dev/null 2>&1
cname=$(cat /var/plexguide/$program.cname) chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1
fi apt-get install dos2unix -yqq && dos2unix /opt/ptsupdate/update.sh 1>/dev/null 2>&1
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
domain=$(cat /var/plexguide/server.domain) }
port=$(cat /tmp/program_port)
ip=$(cat /var/plexguide/server.ip)
ports=$(cat /var/plexguide/server.ports)
hdpath=$(cat /var/plexguide/server.hd.path)
if [ "$program" == "plex" ]; then extra="/web"; else extra=""; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Access Configuration Info
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
tee <<-EOF
▫ $program:${port} <- Use this as the url when connecting another app to $program.
EOF
if [ "$ports" == "" ]; then
tee <<-EOF
▫ $ip:${port}${extra}
EOF
fi
if [ "$domain" != "NOT-SET" ]; then
if [ "$ports" == "" ]; then
tee <<-EOF
▫ $domain:${port}${extra}
EOF
fi
tee <<-EOF
▫ $cname.$domain${extra}
EOF
fi
if [ "$program" == "plex" ]; then
tee <<-EOF
First Time Plex Claim Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
if [ "$domain" != "NOT-SET" ]; then
tee <<-EOF
▫ http://plex.${domain}:32400 <-- Use http; not https
EOF
fi
tee <<-EOF
▫ $ip:${port}${extra}
EOF
fi
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Manual Configuration Required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$program requires additional manual configuration!
EOF
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]] || [[ "$program" == *"qbittorrent"* ]]; then
tee <<-EOF
$program requires "downloader mappings" to enable hardlinking and rapid importing.
If you do not have these mappings, $program can't rename and move the files on import.
This will result in files being copied instead of moved, and it will cause other issues.
The mappings are on the download client settings (advanced setting), at the bottom of the page.
Visit https://github.com/Pandaura/PTS-Team/wiki/Remote-Path-Mappings for more information.
EOF
fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Failure to perform manual configuration changes will cause problems!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌍 Visit the wiki for instructions on how to configure $program.
https://github.com/Pandaura/PTS-Team/wiki/$program
EOF
fi
####--------
if [[ "$program" == *"sabnzbd"* ]] || [[ "$program" == *"nzbget"* ]] ; then
cclean=$(cat /var/plexguide/cloneclean)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 NOTE / INFO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
for incomplete downloads $program used the folder $hdpath/incomplete/nzb
for finished downloads $program used the folder $hdpath/downloads/nzb
beware the cloneclean is set to $cclean min
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [[ "$program" == *"sabnzbd"* ]] ; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 sabnzbd api_key = $sbakey
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [[ "$program" == *"rutorrent"* ]] || [[ "$program" == *"qbittorrent"* ]] || [[ "$program" == *"deluge"* ]]; then
cclean=$(cat /var/plexguide/cloneclean)
tclean=$(($cclean*2))
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 NOTE / INFO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
for incomplete downloads $program used the folder $hdpath/incomplete/torrent
for finished downloads $program used the folder $hdpath/downloads/torrent
beware the cloneclean is set to $tclean min
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [ "$program" == "plex" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Manual Configuration Required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
we prefer using plex_autoscan, unlike other alternatives,
that does not put a lot of pressure on the API of your Google Account.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
if [ "$hdpath" != "/mnt" ]; then
sbakey=$(cat /opt/appdata/sabnzbd/sabnzbd.ini | grep "api_key" | head -n 1 | awk '{print $3}')
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You must add /mnt self to the docker container again
Your $hdpath is not /mnt
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
fi
endline() { endline() {
tee <<-EOF tee <<-EOF

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 KiB

View File

@@ -1 +1 @@
fuuuu ---- Childish comment fuuuu