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/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...
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
**You know who you are.** PTS is forever, others will come and go.
_**Table of Contents**_
@@ -36,9 +20,9 @@ _**Table of Contents**_
# 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
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**
The ideal method of installing the Pandaura is to delete your current build and install Pandaura on a clean system.
Pandaura works best on **ubuntu 18.XX** and this tutorial will assume you are using ubuntu 18.XX.
The ideal method of installing the PTS fork is to delete your current build and install PTS fork on a clean system.
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.
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 upgrade -yqq
sudo apt-get autoclean -yqq
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.
### Optional - updating your PTS to Pandaura
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
### Alternative method of installing PTS fork (without removing your current build)
**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
```
## 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?**
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
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
@@ -133,8 +147,8 @@ Pandaura is a **fork** of PTS/MHA, an all-in-one media solution that deploys a
# 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?
[**[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
#
# Title: PTS List commands
# Author(s): Pandaura
# Author(s): MrDoobPG
# GNU: General Public License v3.0
################################################################################
---
@@ -26,10 +26,26 @@
###### Install PGBlitz
- name: Pandaura
- name: PlexGuide
template:
src: pandaura
dest: /bin/pandaura
src: plexguide
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
mode: 0775
owner: root

View File

@@ -6,7 +6,7 @@
################################################################################
rm -rf /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
chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1

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/install.sh
mkdir -p /opt/plexguide/roles/log
mkdir -p /var/plexguide/logs
mkdir -p /opt/appdata/plexguide
sudocheck
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
clear
pginstall

View File

@@ -6,7 +6,7 @@
################################################################################
rm -rf /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
chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1

View File

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

View File

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

View File

@@ -18,7 +18,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⌛ Cron - Would you like to schedule Cron Jobs (Backups) for $program?
⌛ Cron - Schedule Cron Jobs (Backups) | $program?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] No
@@ -41,10 +41,10 @@ question2() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⌛ Cron - How often and when do you want to run backups?
⌛ Cron - Backup How Often?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WEEKLY BACKUP SCHEDULE
WEEKLY
[ 0 / 7 ] - Sunday
[ 1 ] - Monday
@@ -54,7 +54,7 @@ WEEKLY BACKUP SCHEDULE
[ 5 ] - Friday
[ 6 ] - Saturday
DAILY BACKUPS
DAILY
[ 8 ] - Daily
RANDOM
@@ -76,7 +76,7 @@ question3() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⌛ Cron - Select time of the day?
⌛ Cron - Hour of the Day?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Type an HOUR from [0 to 23]

View File

@@ -4,176 +4,15 @@
# Author(s): Admin9705 - Deiteq
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
program=$(cat /tmp/program_var)
cname=$program
#################################################################################
if [[ -f "/var/plexguide/$program.cname" ]]; then
cname=$(cat /var/plexguide/$program.cname)
fi
# KEY VARIABLE RECALL & EXECUTION
mkdir -p /var/plexguide/cron/
mkdir -p /opt/appdata/plexguide/cron
# FUNCTIONS START ##############################################################
source /opt/plexguide/menu/functions/functions.sh
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
▫ 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
weekrandom() {
while read p; do
echo "$p" >/tmp/program_var
echo $(($RANDOM % 23)) >/var/plexguide/cron/cron.hour
@@ -208,20 +47,20 @@ question1() {
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]
[2] Manual - Select for each app]
[3] Daily - Select random times]
[4] Weekly - Select random times & days]
[1] No [Skip - All Cron Jobs]
[2] Yes [Manual - Select for Each App]
[3] Yes [Daily - Select Random Times]
[4] Yes [Weekly - Select Random Times & Days]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [ "$typed" == "1" ]; then
exit
elif [ "$typed" == "2" ]; then

View File

@@ -19,9 +19,9 @@ emergency(){
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
@@ -32,7 +32,7 @@ EOF
done <<<"$(ls /opt/appdata/plexguide/emergency)"
echo
read -n 1 -s -r -p "Acknowledge info | Press [ENTER]"
read -n 1 -s -r -p "Acknowledge Info | Press [ENTER]"
echo
else
touch ${abc}/emergency.log

View File

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

View File

@@ -26,6 +26,7 @@ pginstall() {
core docstart
rollingpart
portainer
oruborus
core motd
core gcloud
core cleaner
@@ -35,6 +36,7 @@ pginstall() {
core mountcheck
emergency
pgdeploy
# oruborus
}
############################################################ INSTALLER FUNCTIONS
@@ -112,6 +114,16 @@ updateprime() {
echo "21" >${abc}/pg.mountcheck
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() {
gcheck=$(dnsdomainname | tail -c 10)
if [[ "$gcheck" == ".internal" ]]; then

View File

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

View File

@@ -4,16 +4,6 @@
# Author(s): Admin9705
# GNU: General Public License v3.0
################################################################################
source /opt/plexguide/menu/functions/start.sh
declare YELLOW='\033[0;33m'
declare NC='\033[0m'
declare total_size_in_bytes=0
declare total_program=0
declare program_number=0
declare NF='\033[1;32m'
declare NC='\033[0m'
typed="${typed,,}"
runningcheck() {
initial2
runcheck5=$(docker ps | grep ${program_var})
@@ -23,7 +13,7 @@ runningcheck() {
initial() {
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/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/pgvault.output 1>/dev/null 2>&1
touch /var/plexguide/pgvault.output
@@ -50,24 +40,22 @@ initial2() {
}
final() {
total_size_readable=$(numfmt --to=iec --suffix=B $total_size_in_bytes)
echo
echo "All backups complete"$'\t\t\t'"${total_size_readable}"
read -p '💬 Confirm info | Press [ENTER]: ' server </dev/tty
bash /opt/plexguide/menu/pgvault/pgvault.sh
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
bash /opt/pgvault/pgvault.sh
exit
}
queued() {
echo
read -p " ERROR - $typed is already queued! | Press [ENTER] " typed </dev/tty
clear_lines 2
read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
}
badserver() {
echo
read -p ' ERROR - Type an exact server name | Press [ENTER] ' typed </dev/tty
clear_lines 2
read -p ' ERROR - Type an Exact Server Name | Press [ENTER] ' typed </dev/tty
}
#not used yet
@@ -75,15 +63,11 @@ rclonelist() {
ls -l /mnt/gdrive/plexguide/backup | grep "^d" | awk '{print $9}' >pgvault.serverlist
}
value() {
bash /opt/plexguide/menu/pgbox/value.sh
}
pgboxrecall() {
ls -p /opt/coreapps/apps | grep -v / >/var/plexguide/pgvault.apprecall
while read p; do
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
sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall
@@ -94,7 +78,7 @@ pgboxrecall() {
mathprime() {
### List Out Apps In Readable Order (One's Not Installed)
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
echo -n $p >>/var/plexguide/program.temp
echo -n " " >>/var/plexguide/program.temp
@@ -111,10 +95,10 @@ apprecall() {
tree -d -L 1 /opt/appdata | awk '{print $2}' | tail -n +2 | head -n -2 >/var/plexguide/pgvault.apprecall
while read p; do
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
# rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
mathprime
}
@@ -138,11 +122,11 @@ buildup() {
}
################################################ FOR BACKUP - END
serverprime() {
tree -d -L 1 /mnt/unionfs/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)
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
echo -n $p >>/var/plexguide/program.temp
echo -n " " >>/var/plexguide/program.temp
@@ -157,17 +141,21 @@ serverprime() {
server_id=$(cat /var/plexguide/server.id)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔒 Vault ~ Server recall
🚀 Vault ~ Server Recall
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Current $(echo -e ${NF}${server_id}${NC}) & prior servers detected:
📂 Current [${server_id}] & Prior Servers Detected:
$servers
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu_back
read -p '💬 Type server name | Press [ENTER]: ' server </dev/tty
clear_lines 12
read -p '🌍 Type Server Name | Press [ENTER]: ' server </dev/tty
echo $server >/tmp/server.select
if [[ "$server" == "exit" || "$server" == "Exit" || "$server" == "EXIT" || "$server" == "z" || "$server" == "Z" ]]; then exit; fi
@@ -182,7 +170,7 @@ end_menu_back
ls -l /mnt/gdrive/plexguide/backup/$tempserver | awk '{print $9}' | tail -n +2 >/var/plexguide/pgvault.restoreapps
### 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
while read p; do
@@ -190,7 +178,7 @@ end_menu_back
done </var/plexguide/pgvault.restoreapps
### 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
mathprime
}
@@ -213,46 +201,52 @@ buildup2() {
mathprime
vaultrestore
}
################################################ FOR RESTORE - START
################################################ FOR RESTORE - END
######################################################## START - PG Vault Backup
backup_all_start() {
total_size_in_bytes=0
program_number=0
total_program=$(wc -l < /var/plexguide/pgvault.apprecall)
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⬆️ Vault backup start..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
line_above=2
while read p; do
change_line_text $line_above "🔒 Vault is now backing up ${YELLOW}\"$p\"${NC}"
let line_above+=1
let program_number+=1
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Backing Up: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
# Store Used Program
echo $p >/tmp/program_var
# Execute Main Program
backup_process
sleep 2
done </var/plexguide/pgvault.apprecall
final
}
backup_start() {
total_size_in_bytes=0
program_number=0
total_program=$(wc -l < /var/plexguide/pgvault.buildup)
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⬆️ Vault backup start..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
line_above=2
while read p; do
change_line_text $line_above "⬆️ Vault is now backing up ${YELLOW}\"$p\"${NC}"
let line_above+=1
let program_number+=1
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Backing Up: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
# Store Used Program
echo $p >/tmp/program_var
# Execute Main Program
backup_process
sleep 2
done </var/plexguide/pgvault.buildup
final
@@ -263,14 +257,25 @@ backup_process() {
##### Stop Docker Container if Running
runningcheck
if [[ "$running" == "1" ]]; then
echo "🛑 Stopping Docker container - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Stopping Docker Container - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1
docker stop $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Start the Backup Process - Backup Locally First
echo "↘️ Zipping Data Locally - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Zipping Data Locally - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
path=$(cat /var/plexguide/server.hd.path)
tarlocation=$(cat /var/plexguide/data.location)
@@ -278,30 +283,36 @@ backup_process() {
tar \
--warning=no-file-changed --ignore-failed-read --absolute-names --warning=no-file-removed \
--exclude-from=/opt/plexguide/menu/pgvault/exclude.list \
-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
clear_lines 2
--exclude-from=/opt/pgvault/exclude.list \
-C /opt/appdata/${program_var} -cvf ${tarlocation}/${program_var}.tar ./
##### Restart Docker Application if was Running Prior
if [[ "$running" == "1" ]]; then
echo "🔄 Restarting Docker application - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Restarting Docker Application - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
docker restart $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Backing Up Files to GDrive
echo "⬆️ Sending zipped data to Google Drive - $program_var"
tee <<-EOF
useragent="$(cat /var/plexguide/uagent 1>/dev/null 2>&1)"
bwlimit="off"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Sending Zipped Data to Google Drive - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
vfs_dcs="64M"
vfs_mt="580G"
vfs_t="1"
vfs_c="2"
EOF
useragent="$(cat /var/plexguide/uagent)"
bwlimit="$(cat /var/plexguide/blitz.bw)"
vfs_dcs="$(cat /var/plexguide/vfs_dcs)"
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
@@ -316,14 +327,7 @@ backup_process() {
--fast-list \
--bwlimit="$bwlimit" \
--drive-chunk-size="$vfs_dcs" \
--user-agent="$useragent" 1>/dev/null 2>&1
# 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}"
--user-agent="$useragent"
##### Remove File Incase
rm -rf ${tarlocation}/${program_var}.tar 1>/dev/null 2>&1
@@ -334,10 +338,15 @@ backup_process() {
restore_all_start() {
while read p; do
echo "Vault - Restoring: $p"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Restoring: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
clear_lines 1
# Store Used Program
echo $p >/tmp/program_var
@@ -353,10 +362,15 @@ restore_all_start() {
restore_start() {
while read p; do
echo "Vault - Restoring: $p"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Restoring: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
clear_lines 1
# Store Used Program
echo $p >/tmp/program_var
@@ -371,15 +385,26 @@ restore_start() {
restore_process() {
initial2
srecall=$(cat /tmp/server.select)
echo "↘️ Determining Initial File Size - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Determining Initial File Size - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
size=$(du -sh --apparent-size /mnt/gdrive/plexguide/backup/${srecall}/${program_var}.tar | /usr/bin/awk '{print $1}')
sleep 2
echo "Initial File Size: $size"
sleep 2
clear_lines 2
###### Backing Up Files to GDrive
echo "↘️ Downloading Data From Google Drive - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Downloading Data From Google Drive - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
rclone --config /opt/appdata/plexguide/rclone.conf --stats-one-line \
--stats 1s --progress \
@@ -390,14 +415,25 @@ restore_process() {
##### Stop Docker Container if Running
runningcheck
if [ "$running" == "1" ]; then
echo "🛑 Stopping Docker Container - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Stopping Docker Container - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1
docker stop $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Start the Backup Process - Backup Locally First
echo "↘️ UnZipping & Restoring Data - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ UnZipping & Restoring Data - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
mkdir -p "/opt/appdata/${program_var}"
rm -rf "/opt/appdata/${program_var}/*"
@@ -406,10 +442,6 @@ restore_process() {
tar -C /opt/appdata/${program_var} -xvf ${tarlocation}/${program_var}.tar
chown -R 1000:1000 "/opt/appdata/${program_var}"
chmod -R 775 "/opt/appdata/${program_var}"
##for rebuild plex and more ##
value
##rebuild app after restore
if [[ -e "/opt/coreapps/apps/$program_var.yml" ]]; then ansible-playbook /opt/coreapps/apps/$program_var.yml; fi
if [[ -e "/opt/communityapps/$program_var.yml" ]]; then ansible-playbook /opt/communityapps/apps/$program_var.yml; fi
@@ -417,10 +449,15 @@ restore_process() {
##### Restart Docker Application if was Running Prior
if [[ "$running" == "1" ]]; then
echo "🔄 Restarting Docker Application - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Restarting Docker Application - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
docker restart $program_var 1>/dev/null 2>&1
clear_lines 1
fi
##### Remove File Incase
@@ -436,22 +473,26 @@ vaultbackup() {
if [[ "$buildup" == "" ]]; then buildup="NONE"; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔒 Vault ~ Data Storage
🚀 Vault ~ Data Storage
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 App data available to backup
📂 App Data available to Backup
$notrun
--------------------------------------------------------------------------
💾 Apps queued for backup
💾 Apps Queued for Backup
$buildup
[A] to backup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[A] Backup
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu_back
read -p '🌍 Type APP for QUEUE | Type 'all' to backup all apps | Press [ENTER]: ' typed </dev/tty
clear_lines 17
read -p '🌍 Type APP for QUEUE | Type all to backup all apps | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "all" || "$typed" == "All" || "$typed" == "ALL" ]]; then
backup_all_start
@@ -481,22 +522,26 @@ vaultrestore() {
if [ "$buildup" == "" ]; then buildup="NONE"; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔒 Vault ~ Data Recall
🚀 Vault ~ Data Recall
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 App data available to restore
📂 App Data available to Restore
$notrun
--------------------------------------------------------------------------
💾 Apps queued for restore
💾 Apps Queued for Restore
$buildup
[A] to restore
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[A] Restore
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu_back
read -p '🌍 Type APP for QUEUE | Type 'all' to restore all apps | Press [ENTER]: ' typed </dev/tty
clear_lines 17
read -p '🌍 Type APP for QUEUE | Type all to restore all apps | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "all" || "$typed" == "All" || "$typed" == "ALL" ]]; then restore_all_start; fi
@@ -521,20 +566,24 @@ end_menu_back
primaryinterface() {
initial2
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔒 Vault Interface
📁 Vault Interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Used disk space: $used of $capacity | $percentage Used Capacity
🌵 Disk Used Space: $used of $capacity | $percentage Used Capacity
[1] Data Backup
[2] Data Restore
[3] Current Server ID : $server_id
[4] Processing Location : $tarlocation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Backup your data
[2] Restore your data
[3] Change Server ID | Current Server ID : $(echo -e ${NF}$server_id${NC})
[4] Processing location | Current location : $tarlocation
EOF
end_menu_back
read -p 'Type a number | Press [ENTER]: ' typed </dev/tty
clear_lines 15
read -p 'Type a Number | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "1" ]]; then
vaultbackup
@@ -561,32 +610,16 @@ end_menu_back
restorecheck() {
if [[ "$restoreid" == "[NOT-SET]" ]]; then
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⚠️ WARNING! - You must set your recovery ID first. Restarting process!"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ WARNING! - You Must Set Your Recovery ID First! Restarting Process!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -n 1 -s -r -p "Press [ANY] Key to Continue "
echo
clear_lines 5
primaryinterface
exit
fi
}
## Clear output text for n lines (arg $1)
clear_lines() {
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

@@ -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
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 #######################################################################
- name: 'Set Known Facts'
set_fact:

View File

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

View File

@@ -2,91 +2,39 @@
#
# Title: PTS major file
# org.Author(s): Admin9705 - Deiteq
# Mod: Pandaura - history at bottom
# Mod from MrDoob for PTS
# GNU: General Public License v3.0
################################################################################
source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/install.sh
declare NY='\033[0;33m'
declare NC='\033[0m'
declare NG='\033[1;32m'
sudocheck() {
if [[ $EUID -ne 0 ]]; then
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
exit 0
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() {
gitupdate
update=$(cat /var/plexguide/panda.update)
dev=$(cat /var/plexguide/pgcloner.projectversion)
BRANCH=$(cat /var/plexguide/panda.branch)
if [[ "dev" == "$dev" ]]; then
if [[ "$BRANCH" == "master" ]]; 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
rm -rf /opt/plexguide
git clone --single-branch https://github.com/MHA-Team/PTS-Team.git /opt/plexguide 1>/dev/null 2>&1
ansible-playbook /opt/plexguide/menu/version/missing_pull.yml
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
rm -rf /opt/plexguide/place.holder >/dev/null 2>&1
rm -rf /opt/plexguide/.git* >/dev/null 2>&1
}
missingpull() {
file="/opt/plexguide/menu/functions/install.sh"
if [ ! -e "$file" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Base folder is missing!
Base folder went missing!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -94,7 +42,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Re-downloading Pandaura
🍖 NOM NOM - Re-Downloading PTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
@@ -102,7 +50,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Repair complete. Standby!
✅️ Repair Complete! Standby!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -121,198 +69,3 @@ exitcheck() {
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
}
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
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
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
@@ -31,12 +31,12 @@ tee <<-EOF
mergerfs installed version = $mgstored
mergerfs latest version = $mgversion
[Y] UPDATE to latest version
[Y] UPDATE to lateste version
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in
@@ -55,18 +55,18 @@ rcstored="$(rclone --version | awk '{print $2}' | tail -n 3 | head -n 1)"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rclone update panel $rcstored
rClone Update Panel $rcstored
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rclone installed version = $rcstored
Rclone latest version = $rcversion
rclone installed version = $rcstored
rclone latest version = $rcversion
[Y] UPDATE to latest version
[Y] UPDATE to lateste version
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '↘️ Type number | Press [ENTER]: ' typed </dev/tty
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in
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
badinput() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
gcestart
}
sudocheck() {
@@ -29,7 +29,7 @@ sudocheck() {
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
@@ -63,7 +63,7 @@ gcestart() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 GCE Deployment
🌎 GCE Deployment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] Log Into the Account : [ $account ]

View File

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

View File

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

View File

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

View File

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

View File

@@ -15,7 +15,7 @@ file2="/var/plexguide/gce.check"
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

View File

@@ -31,7 +31,7 @@ if [ "$test" == "" ]; then
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
@@ -141,7 +141,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Deploying Your Server!
🚀 Deploying Your Server!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -237,7 +237,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Server: $destroy - Does Not Exist!
Server: $destroy - Does Not Exist!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF

View File

@@ -7,14 +7,14 @@
################################################################################
source /opt/plexguide/menu/functions/install.sh
emergency
file="/bin/pandaura"
if [[ ! -f "/bin/pandaura" ]]; then
cp /opt/plexguide/menu/alias/templates/pts /bin && chown 1000:1000 /bin/pandaura && chmod 0755 /bin/pandaura; fi
file="/bin/pts"
if [[ ! -f "/bin/pts" ]]; then
cp /opt/plexguide/menu/alias/templates/pts /bin && chown 1000:1000 /bin/pts && chmod 0755 /bin/pts; fi
#
clear
printf '
┌─────────────────────────────────────┐
│ -== Pandaura ==-
-== Team PTS ==- │
│ ————————————————————————————————————│
│ Restart PTS: pts │
│ Update PTS: ptsupdate │
@@ -22,13 +22,20 @@ clear
│ Download Your PTS Fork: pgfork │
│ │
│ ————————————————————————————————————│
│ Thanks For being a part of the team │
│ Thanks For Being Part of the Team
│ │
│ Thanks to: │
│ │
Hawkinzzz, Syndrogo, Anap_
Xaritomi, Demon, Man1234,
Pianomanx, xr3negadex, salty, │ |
Davaz, Deiteq, FlickerRate,
ClownFused, MrDoob, Sub7Seven,
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 "callback_whitelist = profile_tasks" >>/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
echo "nocows = 1" >>/etc/ansible/ansible.cfg

View File

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

View File

@@ -6,22 +6,18 @@
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
typed="${typed,,}"
source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/install.sh
################################################################################
source /opt/plexguide/menu/functions/serverid.sh
source /opt/plexguide/menu/functions/nvidia.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() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 RClone dedupe
🚀 RClone dedupe
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFO AND NOTE
Interactively find duplicate files and delete/rename them.
@@ -89,7 +85,7 @@ touch /var/plexguide/pgui.switch
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 Settings Interface Menu
🚀 Settings Interface Menu
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[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
[6] NVIDIA Docker Role : NVIDIA Docker
[7] RCLONE DEDUPE
--------------------------------------------------------------------------
[T] TroubleShoot : PreInstaller
[B] Change Branch : Change Github
[U] Updater : Update fork automatically
__________________________________________________________________________
[99] TroubleShoot : PreInstaller
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -126,38 +120,11 @@ EOF
6) nvidia && clear && setstart ;;
7) rcdupe ;;
###########################################################################
t) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;;
T) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;;
B) branch && clear && setstart ;;
99) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;;
z) exit ;;
Z) exit ;;
*) setstart ;;
esac
}
branch(){
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
touch /var/plexguide/ver.temp
typed="${typed,,}"
sleep 4
## Builds Version List for Display
@@ -32,7 +31,7 @@ while [ "$break" == "no" ]; do
read -p '↘️ Type | PRESS ENTER: ' typed
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 ""
touch /var/plexguide/exited.upgrade
exit
@@ -54,7 +53,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SYSTEM MESSAGE: Version $storage does not exist! - Standby!
SYSTEM MESSAGE: Version $storage does not exist! - Standby!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 4

View File

@@ -82,3 +82,7 @@ $W GDrive | uncrypted : $G$gdrive
$W TDrive | uncrypted : $G$tdrive
$W GDrive | crypted : $G$gcrypt
$W TDrive | crypted : $G$tcrypt
$W %++++++++++ WISE WORD OF THE DAY ++++++++++%
$W $W$wisword
$W %++++++++++ WISE WORD OF THE DAY ++++++++++%"

View File

@@ -31,7 +31,7 @@ EOF
}
inputphase() {
typed="${typed,,}"
rm -rf /var/plexguide/.tmp.removepointmenu 1>/dev/null 2>&1
# Starting Process
@@ -58,7 +58,7 @@ Quitting? Type >>> exit
EOF
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" -ge "1" && "$typed" -le "$num" ]]; then removepointfinal; fi

View File

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

View File

@@ -22,7 +22,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 $program - Set subdomains & ports
$program - Set subdomains & ports
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -62,7 +62,7 @@ EOF
if [[ "$typed" == "A" || "$typed" == "a" ]]; then
exit
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
badinput1
@@ -75,7 +75,7 @@ EOF
fi
fi
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
echo "" >"/var/plexguide/$program.port"
else

View File

@@ -7,12 +7,11 @@
################################################################################
# FUNCTIONS START ##############################################################
typed="${typed,,}"
source /opt/plexguide/menu/functions/functions.sh
queued() {
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
}
@@ -22,7 +21,7 @@ value() {
exists() {
echo ""
echo " ERROR - ${typed} is already installed!"
echo " ERROR - $typed already installed!"
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
@@ -34,7 +33,7 @@ else exists; fi
badinputcom() {
echo ""
echo " ERROR - Bad input! ${typed} not exist"
echo " ERROR - Bad Input! $typed not exist"
echo ""
read -p 'PRESS [ENTER] ' typed </dev/tty
}
@@ -74,7 +73,7 @@ initial() {
}
question1() {
typed="${typed,,}"
### Remove Running Apps
while read p; do
sed -i "/^$p\b/Id" /var/plexguide/app.list
@@ -131,26 +130,29 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💼 Multi-App Installer Community Apps
🚀 Multi-App Installer | Community APPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential apps to install
📂 Potential Apps to Install
$notrun
-------------------------------------------------------------------------
💾 Apps below are queued for installation
💾 Apps Queued for Installation
$buildup
_________________________________________________________________________
[A] Install [Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[A] Install
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
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\>")
if [ "$current" != "" ]; then queued && question1 ; fi

View File

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

View File

@@ -1,15 +1,17 @@
#!/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 ##############################################################
source /opt/plexguide/menu/functions/functions.sh
source /opt/plexguide/menu/functions/start.sh
typed="${typed,,}"
queued() {
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
}
@@ -19,8 +21,8 @@ value() {
exists() {
echo ""
echo "⛔️ ERROR - $typed is already installed!"
read -p "⚠️ Would you like to reinstall $typed? [Y/N] | Press [ENTER] " foo </dev/tty
echo "⛔️ ERROR - $typed Already Installed!"
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
part1
@@ -31,7 +33,7 @@ else exists; fi
badinputcore() {
echo ""
echo "⛔️ ERROR - Bad input! $typed not exist"
echo "⛔️ ERROR - Bad Input! $typed not exist"
echo ""
read -p 'PRESS [ENTER] ' typed </dev/tty
}
@@ -70,7 +72,7 @@ initial() {
}
question1() {
typed="${typed,,}"
### Remove Running Apps
while read p; do
sed -i "/^$p\b/Id" /var/plexguide/app.list
@@ -106,63 +108,51 @@ question1() {
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
### List Out Apps In Readable Order (One's Not Installed)
declare NF='\033[1;32m'
declare NC='\033[0m'
tempfile='/var/plexguide/program.temp'
pgboxinstalled=$(docker ps --format '{{.Names}}')
num=0
sed -i -e "/templates/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 "/_/d" /var/plexguide/app.list
while read p; do
installed=false #boolean
for app in $pgboxinstalled
do
if [ "$p" == "$app" ]; then
installed=true
fi
done
if [ $installed == true ]; then
echo -n "$(echo -e ${NF}$p${NC})" >>$tempfile
else
echo -n $p >>$tempfile
fi
echo -n " " >>$tempfile
echo -n $p >>/var/plexguide/program.temp
echo -n " " >>/var/plexguide/program.temp
num=$((num + 1))
if [[ "$num" == "7" ]]; then
num=0
echo " " >>$tempfile
echo " " >>/var/plexguide/program.temp
fi
done </var/plexguide/app.list
notrun=$(cat $tempfile)
notrun=$(cat /var/plexguide/program.temp)
buildup=$(cat /var/plexguide/pgbox.output)
if [ "$buildup" == "" ]; then buildup="NONE"; fi # make this tidy by removing from list once added
if [ "$buildup" == "" ]; then buildup="NONE"; fi
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
-------------------------------------------------------------------------
💾 Apps below are queued for installation
💾 Apps Queued for Installation
$buildup
_________________________________________________________________________
[A] Install
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu
read -p '💬 Type an app to queue for install | Press [ENTER]: ' typed </dev/tty #convert to lowercase all the fucking time
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\>")
if [ "$current" != "" ]; then queued && question1; fi
@@ -230,7 +220,7 @@ question2() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$p - Is now installing...
$p - Now Installing!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -269,11 +259,5 @@ folder() {
# 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
start

View File

@@ -13,7 +13,7 @@
- name: Cloning Core Apps
git:
repo: 'https://github.com/Pandaura/Apps-Core'
repo: 'https://github.com/MHA-Team/Apps-Core'
dest: /opt/coreapps
version: 'master'
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
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705 - Deiteq
# URL: https://pgblitz.com - http://github.pgblitz.com
# Title: MHA-Team
# Author(s): iDoMnCi
# URL: https://github.com/MHA-Team/MHA-Team
# GNU: General Public License v3.0
################################################################################
typed="${typed,,}"
program=$(cat /tmp/program_var)
cname=$program
if [[ -f "/var/plexguide/$program.cname" ]]; then
cname=$(cat /var/plexguide/$program.cname)
fi
# FUNCTIONS START ##############################################################
source /opt/plexguide/menu/functions/functions.sh
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
queued() {
echo
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
appselect
}
badinput() {
echo ""
echo " ERROR - Bad Input! $typed not exist"
echo " ERROR - Bad Input! $typed not exist"
echo ""
read -p 'PRESS [ENTER] ' typed </dev/tty
}
@@ -239,7 +77,7 @@ appselect() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Multi-App Auto Updater
🚀 Multi-App Auto Updater
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential Apps to Auto Update
@@ -259,9 +97,9 @@ $buildup
EOF
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\>")
if [ "$current" != "" ]; then queued && appselect; fi
@@ -303,6 +141,19 @@ complete() {
exit
}
question2() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Rebuilding Ouroboros!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
ansible-playbook /opt/plexguide/menu/functions/ouroboros.yml
complete
}
start() {
startup
appselect

View File

@@ -1,6 +1,5 @@
#!/bin/bash
channelsdvr() {
typed="${typed,,}"
hdpath=$(cat /var/plexguide/server.hd.path)
tee <<-EOF
@@ -23,13 +22,13 @@ Go Back? Type > exit
EOF
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
else
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking Path $typed
🚀 SYSTEM MESSAGE: Checking Path $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1.5
@@ -52,7 +51,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking if Location is Valid
🚀 SYSTEM MESSAGE: Checking if Location is Valid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1.5
@@ -77,7 +76,7 @@ EOF
#fi
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
tee <<-EOF
@@ -85,9 +84,10 @@ EOF
⛔ ALERT: Path $typed DOES NOT Exist!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Note: You must ensure that linux is able to READ your location.
It's start again for you
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
channelsdvr
fi
fi

View File

@@ -1,7 +1,7 @@
#/bin/bash
###plaxt.sh
api() {
typed="${typed,,}"
domain=$(cat /var/plexguide/server.domain)
tee <<-EOF
@@ -29,7 +29,7 @@ EOF
read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty
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
else
tee <<-EOF
@@ -44,7 +44,7 @@ INFO: Messed up? Rerun this API Interface to update the information!
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi
}

View File

@@ -41,7 +41,7 @@ EOF
echo $typed >/var/plexguide/rcwebui/rcuser.user
read -p '↘️ Type Password | Press [ENTER]: ' typed </dev/tty
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
else
tee <<-EOF
@@ -55,7 +55,7 @@ Password : $(cat /var/plexguide/rcwebui/rcpass.pass)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi
}

View File

@@ -25,7 +25,7 @@ if [ "$program" == "plex" ]; then extra="/web"; else extra=""; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Access Configuration Info
🌎 Access Configuration Info
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -88,7 +88,7 @@ EOF
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
fi
@@ -99,168 +99,7 @@ EOF
🌍 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
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
https://github.com/MHA-Team/PTS-Team/wiki/$program
EOF
fi

View File

@@ -11,13 +11,13 @@ source /opt/plexguide/menu/functions/functions.sh
queued() {
echo
read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
question1
}
exists() {
echo ""
echo " ERROR - $typed Already Installed!"
echo " ERROR - $typed Already Installed!"
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
@@ -29,7 +29,7 @@ else exists; fi
badinputgce() {
echo ""
echo " ERROR - Bad Input! $typed not exist"
echo " ERROR - Bad Input! $typed not exist"
echo ""
read -p 'PRESS [ENTER] ' typed </dev/tty
}
@@ -128,7 +128,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Multi-App Installer | GCE Edition
🚀 Multi-App Installer | GCE Edition
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential Apps to Install
@@ -148,9 +148,9 @@ $buildup
EOF
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\>")
if [ "$current" != "" ]; then queued && question1; fi

View File

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

View File

@@ -7,7 +7,6 @@
################################################################################
# FUNCTIONS START ##############################################################
typed="${typed,,}"
source /opt/plexguide/menu/functions/functions.sh
variable /var/plexguide/boxpersonal.user NON-SET
variable /var/plexguide/boxpersonal.repo NON-SET
@@ -16,7 +15,7 @@ variable /var/plexguide/boxpersonal.branch NON-SET
queued() {
echo
read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
question1
}
@@ -26,7 +25,7 @@ value() {
exists() {
echo ""
echo " ERROR - $typed Already Installed!"
echo " ERROR - $typed Already Installed!"
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
@@ -127,7 +126,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PTS ~ Multi-App Installer || Personal Versions
🚀 PTS ~ Multi-App Installer || Personal Versions
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential Apps to Install
@@ -147,9 +146,9 @@ $buildup
EOF
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\>")
if [ "$current" != "" ]; then queued && question1; fi
@@ -256,7 +255,7 @@ mainbanner() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PTS personal Box Edition!
🚀 PTS personal Box Edition!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬

View File

@@ -5,7 +5,6 @@
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
typed="${typed,,}"
rm -rf /tmp/backup.build 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
@@ -40,12 +39,12 @@ running=$(cat /tmp/backup.final)
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
@@ -56,14 +55,14 @@ $running
EOF
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\>")
if [[ "$tcheck" == "" ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Type an Application Name! Case Senstive! Restarting!
WARNING! - Type an Application Name! Case Senstive! Restarting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1.5
@@ -75,7 +74,7 @@ if [[ "$typed" == "" ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Cannot be left blank. Please type an app
WARNING! - The App Name Cannot Be Blank!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 3
@@ -86,7 +85,7 @@ fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 Now uninstalling - $typed
💎 PASS: Uninstalling - $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1.5
@@ -96,7 +95,7 @@ if [[ "$drunning" == "$typed" ]]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🍖 NOM NOM - Stopping container & uninstalling > $typed
🍖 NOM NOM - Stopping | Removing > $typed Docker Container
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
docker stop $typed 1>/dev/null 2>&1
@@ -126,7 +125,7 @@ sleep 1.5
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ Successfully uninstalled $typed - Now exiting...
✅️ PASS: Uninstalled - $typed - Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2

View File

@@ -18,16 +18,16 @@ mainstart1() {
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
[2] Pandaura : Community
---------------------------------
[3] Personal Fork : Use your own Github fork
[4] Uninstaller : Remove installed apps
[1] PTS : Core
[2] PTS : Community
--------------------------------
[3] Apps : Personal Forks
[4] Apps : Removal
[5] Apps : Auto Update
[Z] Exit
@@ -39,11 +39,11 @@ EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in
1) clear && bash /opt/plexguide/menu/pgbox/core/core.sh ;;
2) clear && bash /opt/plexguide/menu/pgbox/community/community.sh ;;
3) clear && bash /opt/plexguide/menu/pgbox/personal/personal.sh ;;
4) clear && bash /opt/plexguide/menu/pgbox/remove/removal.sh ;;
5) clear && bash /opt/plexguide/menu/pgbox/customparts/autobackup.sh ;;
1) bash /opt/plexguide/menu/pgbox/core/core.sh ;;
2) bash /opt/plexguide/menu/pgbox/community/community.sh ;;
3) bash /opt/plexguide/menu/pgbox/personal/personal.sh ;;
4) bash /opt/plexguide/menu/pgbox/remove/removal.sh ;;
5) bash /opt/plexguide/menu/pgbox/customparts/autobackup.sh ;;
z) exit ;;
Z) exit ;;
*) GCEtest ;;
@@ -54,12 +54,12 @@ mainstart2() {
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -29,6 +29,15 @@ 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

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
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
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

View File

@@ -1,9 +1,5 @@
#!/bin/bash
# FUNCTIONS START ##############################################################
pgautoscan="autoscan"
typed="${typed,,}"
rmoldinstall() {
dcheck=$(systemctl is-active plex_autoscan.service)
if [[ "$dcheck" == "active" ]]; then
@@ -47,7 +43,7 @@ plexcheck() {
if [[ "$pcheck" == "" ]]; then
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Plex is Not Installed or Running! Exiting!
WARNING! - Plex is Not Installed or Running! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
'
dontwork
@@ -64,8 +60,8 @@ token() {
if [[ "$ptoken" != "$X_PLEX_TOKEN" ]]; then
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! Failed to Generate a Valid Plex Token!
WARNING! Exiting Deployment!
WARNING! Failed to Generate a Valid Plex Token!
WARNING! Exiting Deployment!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
'
dontwork
@@ -75,7 +71,7 @@ token() {
tokencreate() {
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 START Plex_AutoScan Token Create
🚀 START Plex_AutoScan Token Create
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
'
@@ -88,7 +84,7 @@ tokencreate() {
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ FINISHED Plex_AutoScan Token 🛈 START SERVERPASS Create
✅ FINISHED Plex_AutoScan Token 🚀 START SERVERPASS Create
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
'
@@ -106,7 +102,7 @@ tokencreate() {
}
badinput() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
clear && question1
}
dontwork() {
@@ -123,7 +119,7 @@ credits() {
clear
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Credits
🚀 Plex_AutoScan Credits
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#########################################################################
@@ -169,7 +165,7 @@ remove() {
removepas() {
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 STARTING Remove Plex AutoScan Docker || l3uddz/plex_autoscan
🚀 STARTING Remove Plex AutoScan Docker || l3uddz/plex_autoscan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
'
@@ -184,7 +180,7 @@ removepas() {
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 FINISHED REMOVE Plex AutoScan Docker
🚀 FINISHED REMOVE Plex AutoScan Docker
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
'
timerremove
@@ -194,7 +190,7 @@ notinstalled() {
printf '
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - PAS is Not Installed or Running! Exiting!
WARNING! - PAS is Not Installed or Running! Exiting!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
'
timerremove
@@ -202,14 +198,14 @@ notinstalled() {
}
##### REMOVE END
logger() {
dcheck=$(docker ps --format '{{.Names}}' | grep "$pgautoscan")
if [[ "$dcheck" == "$pgautoscan" ]]; then
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
if [[ "$dcheck" == "plexautoscan" ]]; then
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
else
notinstalled
@@ -219,7 +215,7 @@ logger() {
fxmatch() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan FixMatching
🚀 Plex_AutoScan FixMatching
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE :
Plex Autoscan will compare the TVDBID/TMDBID/IMDBID sent
@@ -253,7 +249,7 @@ lang() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan FixMatching Lang
🚀 Plex_AutoScan FixMatching Lang
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE : Sample :
@@ -273,7 +269,7 @@ EOF
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
else
tee <<-EOF
@@ -288,7 +284,7 @@ Language Set Is: $typed
EOF
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
fi
}
@@ -296,7 +292,7 @@ runs() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Fix Missmatch
🚀 Plex_AutoScan Fix Missmatch
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] True
@@ -328,7 +324,7 @@ pversion() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex Docker
🚀 Plex Docker
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Linuxserver Docker used "abc"
Plex Docker used "plex"
@@ -350,8 +346,8 @@ showuppage() {
dpas=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
dtra=$(docker ps --format '{{.Names}}' | grep "traefik")
if [[ "$dpas" == "plexautoscan" && "$dtra" == "traefik" ]]; then
showpaspage="http://plexautoscan:3030/$(cat /var/plexguide/pgscan/pgscan.serverpass)"
else showpaspage="http://$(cat /var/plexguide/server.ip):3030/$(cat /var/plexguide/pgscan/pgscan.serverpass)"; fi
showpaspage="http://plexautoscan:3468/$(cat /var/plexguide/pgscan/pgscan.serverpass)"
else showpaspage="http://$(cat /var/plexguide/server.ip):3468/$(cat /var/plexguide/pgscan/pgscan.serverpass)"; fi
}
question1() {
@@ -374,7 +370,7 @@ undeployed() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Interface || l3uddz/plex_autoscan
🚀 Plex_AutoScan Interface || l3uddz/plex_autoscan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Deploy Plex Token [ $pstatus ]
@@ -418,7 +414,7 @@ deplyoed() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex_AutoScan Interface || l3uddz/plex_autoscan
🚀 Plex_AutoScan Interface || l3uddz/plex_autoscan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Deploy Plex Token [ $pstatus ]

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'
set_fact:
pgrole: 'plexautoscan'
intport: '3030'
extport: '3030'
image: 'cloudb0x/autoscan:master'
intport: '3468'
extport: '3468'
image: 'sabrsorensen/alpine-plex_autoscan:1df2c05'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
@@ -21,7 +21,7 @@
include_tasks: './pastask.yml'
# LABELS ######################################################################
- name: 'Adding Traefik for {{pgrole}}'
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
@@ -38,52 +38,23 @@
traefik.frontend.headers.customResponseHeaders: 'X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex'
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'
set_fact:
pg_volumes:
- '/mnt/unionfs/:/data'
- '/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'
- '{{path.stdout}}:{{path.stdout}}'
- '/etc/localtime:/etc/localtime:ro'
- '/var/run/docker.sock:/var/run/docker.sock'
# Env ######################################################################
- name: 'Setting {{pgrole}} ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
AUTOSCAN_VERBOSITY: '1'
DOCKERGID: '999'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'

View File

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

View File

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

View File

@@ -134,7 +134,7 @@ padding: 10px;
</head>
<body text="#FFFFFF">
<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>
</ul>
<div class="image">

View File

@@ -142,7 +142,7 @@ a:visited {
</head>
<body text="#FFFFFF">
<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>
</ul>
<div class="image">

View File

@@ -109,11 +109,11 @@ while true; do
fi
##### Warning for Ports Open with Traefik Deployed
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
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
##### 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
@@ -124,7 +124,7 @@ while true; do
fi
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
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
if [[ -e "/opt/appdata/plexguide/emergency/message.c" ]]; then
rm -rf /opt/appdata/plexguide/emergency/message.c

View File

@@ -134,7 +134,7 @@ padding: 10px;
</head>
<body text="#FFFFFF">
<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>
</ul>
<div class="image">

View File

@@ -142,7 +142,7 @@ a:visited {
</head>
<body text="#FFFFFF">
<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>
</ul>
<div class="image">

View File

@@ -134,7 +134,7 @@ padding: 10px;
</head>
<body text="#FFFFFF">
<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>
</ul>
<div class="image">

View File

@@ -4,12 +4,6 @@
# Author(s): Admin9705
# 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() {
initial2
runcheck5=$(docker ps | grep ${program_var})
@@ -46,24 +40,22 @@ initial2() {
}
final() {
total_size_readable=$(numfmt --to=iec --suffix=B $total_size_in_bytes)
echo
echo "All backup complete"$'\t\t\t'"${total_size_readable}"
read -p '' typed </dev/tty
bash /opt/plexguide/menu/pgvault/pgvault.sh
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
bash /opt/pgvault/pgvault.sh
exit
}
queued() {
echo
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
clear_lines 2
}
badserver() {
echo
read -p '⛔️ ERROR - Type an Exact Server Name | Press [ENTER] ' typed </dev/tty
clear_lines 2
}
#not used yet
@@ -75,7 +67,7 @@ pgboxrecall() {
ls -p /opt/coreapps/apps | grep -v / >/var/plexguide/pgvault.apprecall
while read p; do
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
sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall
@@ -103,7 +95,7 @@ apprecall() {
tree -d -L 1 /opt/appdata | awk '{print $2}' | tail -n +2 | head -n -2 >/var/plexguide/pgvault.apprecall
while read p; do
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
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
@@ -149,6 +141,7 @@ serverprime() {
server_id=$(cat /var/plexguide/server.id)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Vault ~ Server Recall
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -160,9 +153,9 @@ $servers
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🌍 Type Server Name | Press [ENTER]: ' server </dev/tty
clear_lines 12
echo $server >/tmp/server.select
if [[ "$server" == "exit" || "$server" == "Exit" || "$server" == "EXIT" || "$server" == "z" || "$server" == "Z" ]]; then exit; fi
@@ -215,17 +208,16 @@ buildup2() {
######################################################## START - PG Vault Backup
backup_all_start() {
total_size_in_bytes=0
program_number=0
total_program=$(wc -l < /var/plexguide/pgvault.apprecall)
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 Vault backup start..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
line_above=2
while read p; do
change_line_text $line_above "🚀 Vault is now backing up ${YELLOW}\"$p\"${NC}"
let line_above+=1
let program_number+=1
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Backing Up: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
# Store Used Program
@@ -239,17 +231,15 @@ backup_all_start() {
}
backup_start() {
total_size_in_bytes=0
program_number=0
total_program=$(wc -l < /var/plexguide/pgvault.buildup)
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 Vault backup start..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
line_above=2
while read p; do
change_line_text $line_above "🚀 Vault is now backing up ${YELLOW}\"$p\"${NC}"
let line_above+=1
let program_number+=1
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Backing Up: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
# Store Used Program
@@ -267,15 +257,25 @@ backup_process() {
##### Stop Docker Container if Running
runningcheck
if [[ "$running" == "1" ]]; then
echo "↘️ Stopping Docker Container - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Stopping Docker Container - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1
docker stop $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Start the Backup Process - Backup Locally First
echo "↘️ Zipping Data Locally - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Zipping Data Locally - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
path=$(cat /var/plexguide/server.hd.path)
tarlocation=$(cat /var/plexguide/data.location)
@@ -283,30 +283,36 @@ backup_process() {
tar \
--warning=no-file-changed --ignore-failed-read --absolute-names --warning=no-file-removed \
--exclude-from=/opt/plexguide/menu/pgvault/exclude.list \
-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
clear_lines 2
--exclude-from=/opt/pgvault/exclude.list \
-C /opt/appdata/${program_var} -cvf ${tarlocation}/${program_var}.tar ./
##### Restart Docker Application if was Running Prior
if [[ "$running" == "1" ]]; then
echo "↘️ Restarting Docker Application - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Restarting Docker Application - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
docker restart $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Backing Up Files to GDrive
echo "↘️ Sending Zipped Data to Google Drive - $program_var"
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)"
vfs_c="$(cat /var/plexguide/vfs_c 1>/dev/null 2>&1)"
EOF
useragent="$(cat /var/plexguide/uagent)"
bwlimit="$(cat /var/plexguide/blitz.bw)"
vfs_dcs="$(cat /var/plexguide/vfs_dcs)"
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
@@ -321,36 +327,8 @@ backup_process() {
--fast-list \
--bwlimit="$bwlimit" \
--drive-chunk-size="$vfs_dcs" \
--user-agent="$useragent" 1>/dev/null 2>&1
# 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
--user-agent="$useragent"
##### Remove File Incase
rm -rf ${tarlocation}/${program_var}.tar 1>/dev/null 2>&1
}
## Clear output text for n lines (arg $1)
clear_lines() {
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
# GNU: General Public License v3.0
################################################################################
source /opt/plexguide/menu/functions/start.sh
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ SETTING: Backup Download Location
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
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!
Examples:
@@ -19,15 +19,17 @@ Examples:
2. /hd2/spongebob
NOTE: Start with a / and end with no trailing slash!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu_back
# Standby
read -p 'TYPE the location | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
read -p 'TYPE the Location & Press [ENTER]: ' typed </dev/tty
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ NOTICE: Checking - $typed's existance. Please standby...
⚠️ NOTICE: Checking - $typed's existance ! Please Standby
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -36,10 +38,11 @@ if [ "$typed" == "" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ WARNING! - The ID cannot be blank!
⛔️ WARNING! - The ID Cannot Be Blank!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 3
bash /opt/plexguide/menu/interface/serverid.sh
exit
else
@@ -65,14 +68,14 @@ else
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
Changed To: $typed
EOF
read -n 1 -s -r -p "Press [ANY KEY] to continue "
read -n 1 -s -r -p "Press [ANY KEY] to Continue "
echo ""
fi
@@ -85,7 +88,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ WARNING! - This location does not exist! Exiting... (Case senstive)
⛔️ WARNING! - This Location Does Not Exist! Exiting! (Case Senstive)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -96,7 +99,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅️ PASS: Location! Storing the name of the location!
✅️ PASS: Location! Storing the Name of the Location!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -107,7 +110,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌇 PASS: Process complete!
🌇 PASS: Process Complete!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF

View File

@@ -4,16 +4,6 @@
# Author(s): Admin9705
# GNU: General Public License v3.0
################################################################################
source /opt/plexguide/menu/functions/start.sh
declare YELLOW='\033[0;33m'
declare NC='\033[0m'
declare total_size_in_bytes=0
declare total_program=0
declare program_number=0
declare NF='\033[1;32m'
declare NC='\033[0m'
typed="${typed,,}"
runningcheck() {
initial2
runcheck5=$(docker ps | grep ${program_var})
@@ -50,24 +40,22 @@ initial2() {
}
final() {
total_size_readable=$(numfmt --to=iec --suffix=B $total_size_in_bytes)
echo
echo "All backups complete"$'\t\t\t'"${total_size_readable}"
read -p '' typed </dev/tty
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
bash /opt/pgvault/pgvault.sh
exit
}
queued() {
echo
read -p " ERROR - $typed is already queued! | Press [ENTER] " typed </dev/tty
clear_lines 2
read -p " ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
}
badserver() {
echo
read -p ' ERROR - Type an exact server name | Press [ENTER] ' typed </dev/tty
clear_lines 2
read -p ' ERROR - Type an Exact Server Name | Press [ENTER] ' typed </dev/tty
}
#not used yet
@@ -75,10 +63,6 @@ rclonelist() {
ls -l /mnt/gdrive/plexguide/backup | grep "^d" | awk '{print $9}' >pgvault.serverlist
}
value() {
bash /opt/plexguide/menu/pgbox/value.sh
}
pgboxrecall() {
ls -p /opt/coreapps/apps | grep -v / >/var/plexguide/pgvault.apprecall
while read p; do
@@ -138,7 +122,7 @@ buildup() {
}
################################################ FOR BACKUP - END
serverprime() {
tree -d -L 1 /mnt/unionfs/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)
num=0
@@ -157,17 +141,21 @@ serverprime() {
server_id=$(cat /var/plexguide/server.id)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔒 Vault ~ Server recall
🚀 Vault ~ Server Recall
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Current $(echo -e ${NF}${server_id}${NC}) & prior servers detected:
📂 Current [${server_id}] & Prior Servers Detected:
$servers
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu_back
read -p '💬 Type server name | Press [ENTER]: ' server </dev/tty
clear_lines 12
read -p '🌍 Type Server Name | Press [ENTER]: ' server </dev/tty
echo $server >/tmp/server.select
if [[ "$server" == "exit" || "$server" == "Exit" || "$server" == "EXIT" || "$server" == "z" || "$server" == "Z" ]]; then exit; fi
@@ -220,17 +208,16 @@ buildup2() {
######################################################## START - PG Vault Backup
backup_all_start() {
total_size_in_bytes=0
program_number=0
total_program=$(wc -l < /var/plexguide/pgvault.apprecall)
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⬆️ Vault backup start..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
line_above=2
while read p; do
change_line_text $line_above "🔒 Vault is now backing up ${YELLOW}\"$p\"${NC}"
let line_above+=1
let program_number+=1
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Backing Up: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
# Store Used Program
@@ -244,17 +231,15 @@ backup_all_start() {
}
backup_start() {
total_size_in_bytes=0
program_number=0
total_program=$(wc -l < /var/plexguide/pgvault.buildup)
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⬆️ Vault backup start..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
line_above=2
while read p; do
change_line_text $line_above "⬆️ Vault is now backing up ${YELLOW}\"$p\"${NC}"
let line_above+=1
let program_number+=1
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Backing Up: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
# Store Used Program
@@ -272,15 +257,25 @@ backup_process() {
##### Stop Docker Container if Running
runningcheck
if [[ "$running" == "1" ]]; then
echo "🛑 Stopping Docker container - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Stopping Docker Container - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1
docker stop $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Start the Backup Process - Backup Locally First
echo "↘️ Zipping Data Locally - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Zipping Data Locally - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
path=$(cat /var/plexguide/server.hd.path)
tarlocation=$(cat /var/plexguide/data.location)
@@ -289,29 +284,35 @@ backup_process() {
tar \
--warning=no-file-changed --ignore-failed-read --absolute-names --warning=no-file-removed \
--exclude-from=/opt/pgvault/exclude.list \
-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
clear_lines 2
-C /opt/appdata/${program_var} -cvf ${tarlocation}/${program_var}.tar ./
##### Restart Docker Application if was Running Prior
if [[ "$running" == "1" ]]; then
echo "🔄 Restarting Docker application - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Restarting Docker Application - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
docker restart $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Backing Up Files to GDrive
echo "⬆️ Sending zipped data to Google Drive - $program_var"
tee <<-EOF
useragent="$(cat /var/plexguide/uagent 1>/dev/null 2>&1)"
bwlimit="off"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Sending Zipped Data to Google Drive - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
vfs_dcs="64M"
vfs_mt="580G"
vfs_t="1"
vfs_c="2"
EOF
useragent="$(cat /var/plexguide/uagent)"
bwlimit="$(cat /var/plexguide/blitz.bw)"
vfs_dcs="$(cat /var/plexguide/vfs_dcs)"
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
@@ -326,14 +327,7 @@ backup_process() {
--fast-list \
--bwlimit="$bwlimit" \
--drive-chunk-size="$vfs_dcs" \
--user-agent="$useragent" 1>/dev/null 2>&1
# 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}"
--user-agent="$useragent"
##### Remove File Incase
rm -rf ${tarlocation}/${program_var}.tar 1>/dev/null 2>&1
@@ -344,10 +338,15 @@ backup_process() {
restore_all_start() {
while read p; do
echo "Vault - Restoring: $p"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Restoring: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
clear_lines 1
# Store Used Program
echo $p >/tmp/program_var
@@ -363,10 +362,15 @@ restore_all_start() {
restore_start() {
while read p; do
echo "Vault - Restoring: $p"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Vault - Restoring: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
clear_lines 1
# Store Used Program
echo $p >/tmp/program_var
@@ -381,15 +385,26 @@ restore_start() {
restore_process() {
initial2
srecall=$(cat /tmp/server.select)
echo "↘️ Determining Initial File Size - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Determining Initial File Size - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
size=$(du -sh --apparent-size /mnt/gdrive/plexguide/backup/${srecall}/${program_var}.tar | /usr/bin/awk '{print $1}')
sleep 2
echo "Initial File Size: $size"
sleep 2
clear_lines 2
###### Backing Up Files to GDrive
echo "↘️ Downloading Data From Google Drive - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Downloading Data From Google Drive - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
rclone --config /opt/appdata/plexguide/rclone.conf --stats-one-line \
--stats 1s --progress \
@@ -400,14 +415,25 @@ restore_process() {
##### Stop Docker Container if Running
runningcheck
if [ "$running" == "1" ]; then
echo "🛑 Stopping Docker Container - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Stopping Docker Container - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1
docker stop $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Start the Backup Process - Backup Locally First
echo "↘️ UnZipping & Restoring Data - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ UnZipping & Restoring Data - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
mkdir -p "/opt/appdata/${program_var}"
rm -rf "/opt/appdata/${program_var}/*"
@@ -416,10 +442,6 @@ restore_process() {
tar -C /opt/appdata/${program_var} -xvf ${tarlocation}/${program_var}.tar
chown -R 1000:1000 "/opt/appdata/${program_var}"
chmod -R 775 "/opt/appdata/${program_var}"
##for rebuild plex and more ##
value
##rebuild app after restore
if [[ -e "/opt/coreapps/apps/$program_var.yml" ]]; then ansible-playbook /opt/coreapps/apps/$program_var.yml; fi
if [[ -e "/opt/communityapps/$program_var.yml" ]]; then ansible-playbook /opt/communityapps/apps/$program_var.yml; fi
@@ -427,10 +449,15 @@ restore_process() {
##### Restart Docker Application if was Running Prior
if [[ "$running" == "1" ]]; then
echo "🔄 Restarting Docker Application - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Restarting Docker Application - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
docker restart $program_var 1>/dev/null 2>&1
clear_lines 1
fi
##### Remove File Incase
@@ -446,22 +473,26 @@ vaultbackup() {
if [[ "$buildup" == "" ]]; then buildup="NONE"; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔒 Vault ~ Data Storage
🚀 Vault ~ Data Storage
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 App data available to backup
📂 App Data available to Backup
$notrun
--------------------------------------------------------------------------
💾 Apps queued for backup
💾 Apps Queued for Backup
$buildup
[A] to backup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[A] Backup
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu_back
read -p '🌍 Type APP for QUEUE | Type 'all' to backup all apps | Press [ENTER]: ' typed </dev/tty
clear_lines 17
read -p '🌍 Type APP for QUEUE | Type all to backup all apps | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "all" || "$typed" == "All" || "$typed" == "ALL" ]]; then
backup_all_start
@@ -491,22 +522,26 @@ vaultrestore() {
if [ "$buildup" == "" ]; then buildup="NONE"; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔒 Vault ~ Data Recall
🚀 Vault ~ Data Recall
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 App data available to restore
📂 App Data available to Restore
$notrun
--------------------------------------------------------------------------
💾 Apps queued for restore
💾 Apps Queued for Restore
$buildup
[A] to restore
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[A] Restore
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu_back
read -p '🌍 Type APP for QUEUE | Type 'all' to restore all apps | Press [ENTER]: ' typed </dev/tty
clear_lines 17
read -p '🌍 Type APP for QUEUE | Type all to restore all apps | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "all" || "$typed" == "All" || "$typed" == "ALL" ]]; then restore_all_start; fi
@@ -531,20 +566,24 @@ end_menu_back
primaryinterface() {
initial2
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔒 Vault Interface
📁 Vault Interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Used disk space: $used of $capacity | $percentage Used Capacity
🌵 Disk Used Space: $used of $capacity | $percentage Used Capacity
[1] Data Backup
[2] Data Restore
[3] Current Server ID : $server_id
[4] Processing Location : $tarlocation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Backup your data
[2] Restore your data
[3] Change Server ID | Current Server ID : $(echo -e ${NF}$server_id${NC})
[4] Processing location | Current location : $tarlocation
EOF
end_menu_back
read -p 'Type a number | Press [ENTER]: ' typed </dev/tty
clear_lines 15
read -p 'Type a Number | Press [ENTER]: ' typed </dev/tty
if [[ "$typed" == "1" ]]; then
vaultbackup
@@ -571,32 +610,16 @@ end_menu_back
restorecheck() {
if [[ "$restoreid" == "[NOT-SET]" ]]; then
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⚠️ WARNING! - You must set your recovery ID first. Restarting process!"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ WARNING! - You Must Set Your Recovery ID First! Restarting Process!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -n 1 -s -r -p "Press [ANY] Key to Continue "
echo
clear_lines 5
primaryinterface
exit
fi
}
## Clear output text for n lines (arg $1)
clear_lines() {
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,8 +5,8 @@
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
source /opt/plexguide/menu/pgvault/functions.sh
source /opt/plexguide/menu/functions/pgvault.func
source /opt/pgvault/functions.sh
source /opt/pgvault/pgvault.func
file="/var/plexguide/restore.id"
if [ ! -e "$file" ]; then
echo "[NOT-SET]" >/var/plexguide/restore.id

View File

@@ -42,8 +42,9 @@ initial2() {
final() {
echo
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
clear_lines 2
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
bash /opt/pgvault/pgvault.sh
exit
}
@@ -51,13 +52,11 @@ final() {
queued() {
echo
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
clear_lines 2
}
badserver() {
echo
read -p '⛔️ ERROR - Type an Exact Server Name | Press [ENTER] ' typed </dev/tty
clear_lines 2
}
#not used yet
@@ -143,6 +142,7 @@ serverprime() {
server_id=$(cat /var/plexguide/server.id)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Backup & Restore ~ Server Recall [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -154,9 +154,9 @@ $servers
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🌍 Type Server Name | Press [ENTER]: ' server </dev/tty
clear_lines 12
echo $server >/tmp/server.select
if [[ "$server" == "exit" || "$server" == "Exit" || "$server" == "EXIT" || "$server" == "z" || "$server" == "Z" ]]; then exit; fi
@@ -211,10 +211,15 @@ buildup2() {
backup_all_start() {
while read p; do
echo " Backing Up: $p"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Backing Up: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
clear_lines 1
# Store Used Program
echo $p >/tmp/program_var
@@ -228,10 +233,15 @@ backup_all_start() {
backup_start() {
while read p; do
echo " Backing Up: $p"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Backing Up: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
clear_lines 1
# Store Used Program
echo $p >/tmp/program_var
@@ -248,15 +258,25 @@ backup_process() {
runningcheck
if [ "$running" == "1" ]; then
echo "↘️ Stopping Docker Container - $program_var [ Protected APPS ]"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Stopping Docker Container - $program_var [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1
docker stop $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Start the Backup Process - Backup Locally First
echo "↘️ Zipping Data Locally - $program_var [ Protected APPS ]"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Zipping Data Locally - $program_var [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
path=$(cat /var/plexguide/server.hd.path)
tarlocation=$(cat /var/plexguide/data.location)
@@ -264,32 +284,39 @@ backup_process() {
tar \
--warning=no-file-changed --ignore-failed-read --absolute-names --warning=no-file-removed \
--exclude-from=/opt/plexguide/menu/pgvault/exclude.list \
-czf - /opt/appdata/${program_var} | openssl enc -e -aes256 -out /opt/appdata/plexguide/${program_var}.tar.gz ./ \
| cut -b1-$(tput cols) | sed -u 'i\\o033[2K' | stdbuf -o0 tr '\n' '\r'; echo
clear_lines 2
--exclude-from=/opt/pgvault/exclude.list \
-czf - /opt/appdata/${program_var} | openssl enc -e -aes256 -out /opt/appdata/plexguide/${program_var}.tar.gz ./
##### Restart Docker Application if was Running Prior
if [ "$running" == "1" ]; then
echo "↘️ Restarting Docker Application - $program_var [ Protected APPS ]"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Restarting Docker Application - $program_var [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
docker restart $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Backing Up Files to GDrive
echo "↘️ Sending Zipped Data to Google Drive - $program_var [ Protected APPS ]"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Sending Zipped Data to Google Drive - $program_var [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
# User specifying VARS
useragent="$(cat /var/plexguide/uagent 1>/dev/null 2>&1)"
bwlimit="$(cat /var/plexguide/blitz.bw 1>/dev/null 2>&1)"
useragent="$(cat /var/plexguide/uagent)"
bwlimit="$(cat /var/plexguide/blitz.bw)"
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)"
vfs_c="$(cat /var/plexguide/vfs_c 1>/dev/null 2>&1)"
vfs_dcs="$(cat /var/plexguide/vfs_dcs)"
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}/protected/ 1>/dev/null 2>&1
@@ -305,12 +332,10 @@ backup_process() {
--fast-list \
--bwlimit="$bwlimit" \
--drive-chunk-size="$vfs_dcs" \
--user-agent="$useragent" 1>/dev/null 2>&1
--user-agent="$useragent"
##### Remove File Incase
rm -rf ${tarlocation}/${program_var}.tar.gz 1>/dev/null 2>&1
clear_lines 1
echo "✅ \"$program_var\" has been backed up to Google Drive"
}
######################################################## END - PG Vault Backup
#
@@ -318,10 +343,15 @@ backup_process() {
restore_all_start() {
while read p; do
echo " Restoring: $p"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Restoring: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
clear_lines 1
# Store Used Program
echo $p >/tmp/program_var
@@ -337,10 +367,15 @@ restore_all_start() {
restore_start() {
while read p; do
echo " Restoring: $p"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Restoring: $p
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2.5
clear_lines 1
# Store Used Program
echo $p >/tmp/program_var
@@ -355,17 +390,26 @@ restore_start() {
restore_process() {
initial2
srecall=$(cat /tmp/server.select)
echo "↘️ Determining Initial File Size - $program_var [ Protected APPS ]"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Determining Initial File Size - $program_var [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
size=$(du -sh --apparent-size /mnt/gdrive/plexguide/backup/${srecall}/protected/${program_var}.tar.gz | /usr/bin/awk '{print $1}')
sleep 2
echo "Initial File Size: $size"
sleep 2
clear_lines 2
###### Backing Up Files to GDrive
echo "↘️ Downloading Data From Google Drive - $program_var [ Protected APPS ]"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Downloading Data From Google Drive - $program_var [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
# User specifying VARS
useragent="$(cat /var/plexguide/uagent)"
bwlimit="$(cat /var/plexguide/blitz.bw)"
@@ -386,22 +430,31 @@ restore_process() {
--fast-list \
--bwlimit="$bwlimit" \
--drive-chunk-size="$vfs_dcs" \
--user-agent="$useragent" \
| cut -b1-$(tput cols) | sed -u 'i\\o033[2K' | stdbuf -o0 tr '\n' '\r'; echo
--user-agent="$useragent"
clear_lines 2
##### Stop Docker Container if Running
runningcheck
if [ "$running" == "1" ]; then
echo "↘️ Stopping Docker Container - $program_var [ Protected APPS ]"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Stopping Docker Container - $program_var [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1
docker stop $program_var 1>/dev/null 2>&1
clear_lines 1
fi
###### Start the Backup Process - Backup Locally First
echo "↘️ UnZipping & Restoring Data - $program_var [ Protected APPS ]"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ UnZipping & Restoring Data - $program_var [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
mkdir -p "/opt/appdata/${program_var}"
rm -rf "/opt/appdata/${program_var}/*"
@@ -411,13 +464,17 @@ restore_process() {
chown -R 1000:1000 "/opt/appdata/${program_var}"
chmod -R 775 "/opt/appdata/${program_var}"
clear_lines 1
##### Restart Docker Application if was Running Prior
if [ "$running" == "1" ]; then
echo "↘️ Restarting Docker Application - $program_var"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Restarting Docker Application - $program_var
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
docker restart $program_var 1>/dev/null 2>&1
clear_lines 1
fi
##### Remove File Incase
@@ -433,6 +490,7 @@ vaultbackup() {
if [ "$buildup" == "" ]; then buildup="NONE"; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Backup & Restore ~ Data Storage [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -449,9 +507,9 @@ $buildup
[A] Backup
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🌍 Type APP for QUEUE | Type all to backup all apps | Press [ENTER]: ' typed </dev/tty
clear_lines 17
if [[ "$typed" == "all" || "$typed" == "All" || "$typed" == "ALL" ]]; then
backup_all_start
@@ -481,6 +539,7 @@ vaultrestore() {
if [ "$buildup" == "" ]; then buildup="NONE"; fi
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Backup & Restore ~ Data Recall [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -497,9 +556,9 @@ $buildup
[A] Restore
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🌍 Type APP for QUEUE | Type all to restore all apps | Press [ENTER]: ' typed </dev/tty
clear_lines 17
if [[ "$typed" == "all" || "$typed" == "All" || "$typed" == "ALL" ]]; then restore_all_start; fi
@@ -524,23 +583,24 @@ EOF
primaryinterface() {
initial2
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📁 Backup & Restore Interface [ Protected APPS ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌵 Disk Used Space: $used of $capacity | $percentage Used Capacity
[1] Backup your data
[2] Restore your data
[3] Change Server ID | Current Server ID : $server_id
[4] Processing Location | Current location : $tarlocation
[1] Data Backup
[2] Data Restore
[3] Current Server ID : $server_id
[4] Processing Location: $tarlocation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p 'Type a Number | Press [ENTER]: ' typed </dev/tty
clear_lines 15
if [ "$typed" == "1" ]; then
vaultbackup
@@ -567,22 +627,16 @@ EOF
restorecheck() {
if [ "$restoreid" == "[NOT-SET]" ]; then
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⛔️ WARNING! - You Must Set Your Recovery ID First! Restarting Process!"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ WARNING! - You Must Set Your Recovery ID First! Restarting Process!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -n 1 -s -r -p "Press [ANY] Key to Continue "
echo
clear_lines 5
primaryinterface
exit
fi
}
## Clear output text for n lines ($1 args)
clear_lines() {
for (( i=1; i <= $(($1)); i++ ));do
tput cuu1
tput el
done
}

View File

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

View File

@@ -7,17 +7,17 @@
################################################################################
# FUNCTIONS START ##############################################################
typed="${typed,,}"
# BAD INPUT
badinput() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1
}
badinput2() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question2
}
@@ -39,7 +39,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PlexToken Generator
🌎 PlexToken Generator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Token Status : [$pstatus]
@@ -55,7 +55,7 @@ EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
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 Password | Press [ENTER]: ' pw </dev/tty
@@ -67,7 +67,7 @@ EOF
EOF
sleep 3
question2
elif [ "${typed}" == "2" ]; then
elif [ "$typed" == "2" ]; then
tee <<-EOF
@@ -81,7 +81,7 @@ EOF
pw=$(cat /var/plexguide/plex.pw)
user=$(cat /var/plexguide/plex.user)
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit
else badinput; fi
}
@@ -144,7 +144,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PlexToken Generation Failed!
PlexToken Generation Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Process will repeat until you succeed or exit!
@@ -173,7 +173,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PlexToken Generation Failed!
PlexToken Generation Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Process will repeat until you succeed or exit!

View File

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

View File

@@ -6,17 +6,17 @@
################################################################################
# FUNCTIONS START ##############################################################
typed="${typed,,}"
# BAD INPUT
badinput() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1
}
badinput2() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question2
}
@@ -26,7 +26,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex User Name Store
🌎 Plex User Name Store
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] - Generate stored details for Plex Dupefinder
@@ -38,7 +38,7 @@ EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
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 Pass | Press [ENTER]: ' pw </dev/tty
@@ -50,7 +50,7 @@ EOF
EOF
sleep 3
question2
elif [ "${typed}" == "2" ]; then
elif [ "$typed" == "2" ]; then
tee <<-EOF
@@ -64,7 +64,7 @@ EOF
pw=$(cat /var/plex_dupe/plex.pw)
user=$(cat /var/plex_dupe/plex.user)
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit
else badinput; fi
}
@@ -92,7 +92,7 @@ User Pass: [ $pw ]
EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
if [ "${typed}" == "1" ]; then
if [ "$typed" == "1" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -104,9 +104,9 @@ NOTE: If the token is bad, this process will repeat again!
EOF
sleep 4
question3
elif [ "${typed}" == "2" ]; then
elif [ "$typed" == "2" ]; then
question1
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit
else badinput2; fi
}
@@ -130,7 +130,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Details Failed!
Details Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Process will repeat until you succeed or exit!

View File

@@ -37,7 +37,7 @@ plexcheck() {
if [ "$pcheck" == "" ]; then
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
@@ -65,7 +65,7 @@ bash /opt/plexguide/menu/plexpatrol/token.sh && clear
# BAD INPUT
badinput() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1
}
@@ -73,7 +73,7 @@ selection1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Instantly Kick Video Transcodes?
🚀 Instantly Kick Video Transcodes?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] False
@@ -93,7 +93,7 @@ selection2() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Instantly Kick 4k - Video Transcodes?
🚀 Instantly Kick 4k - Video Transcodes?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] False
@@ -113,7 +113,7 @@ selection3() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Instantly Kick Audio Transcodes?
🚀 Instantly Kick Audio Transcodes?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] False
@@ -133,7 +133,7 @@ selection4() {
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 ]
@@ -149,7 +149,7 @@ selection5() {
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
@@ -165,7 +165,7 @@ selection6() {
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
@@ -181,7 +181,7 @@ selection7() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Remove Plex Patrol || l3uddz/plex_patrol
🚀 Remove Plex Patrol || l3uddz/plex_patrol
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ 1 ] - NO
@@ -205,7 +205,7 @@ chk=$(figlet Plex Patrol | lolcat )
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex Patrol Credits
🚀 Plex Patrol Credits
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$chk
@@ -241,7 +241,7 @@ deploycheck
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Plex - Patrol Interface || l3uddz/plex_patrol
🚀 Plex - Patrol Interface || l3uddz/plex_patrol
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Plex Token [ $pstatus ]

View File

@@ -7,17 +7,17 @@
################################################################################
# FUNCTIONS START ##############################################################
typed="${typed,,}"
# BAD INPUT
badinput() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1
}
badinput2() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question2
}
@@ -25,7 +25,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PlexToken Generator
🌎 PlexToken Generator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Generate new Token for Plex Patrol
@@ -34,7 +34,7 @@ Generate new Token for Plex Patrol
EOF
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 Password | Press [ENTER]: ' pw </dev/tty
@@ -73,7 +73,7 @@ User Pass: $pw
EOF
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
if [ "${typed}" == "1" ]; then
if [ "$typed" == "1" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -85,9 +85,9 @@ NOTE: If the token is bad, this process will repeat again!
EOF
sleep 4
question3
elif [ "${typed}" == "2" ]; then
elif [ "$typed" == "2" ]; then
question1
elif [[ "${typed}" == "z" ]]; then
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
exit
else badinput2; fi
}
@@ -129,7 +129,7 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PlexToken Generation Failed!
PlexToken Generation Failed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Process will repeat until you succeed or exit!

View File

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

View File

@@ -22,17 +22,17 @@ count=$(wc -l </var/plexguide/container.running)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PortGuard - Rebuilding containers
⚠️ PortGuard - Rebuilding Containers!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1
sleep 2
for ((i = 1; i < $count + 1; i++)); do
app=$(sed "${i}q;d" /var/plexguide/container.running)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PortGuard - Rebuilding [$app]
↘️ PortGuard - Rebuilding [$app]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -47,8 +47,8 @@ done
echo ""
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 PortGuard - All containers are rebuilt ✔️
✅️ PortGuard - All Containers Rebuilt!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
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
################################################################################
# Create Variables (If New) & Recall
source /opt/plexguide/menu/functions/start.sh
source /opt/plexguide/menu/functions/pgvault.func
typed="${typed,,}"
pcloadletter() {
filevg="/var/plexguide"
touch $filevg/pgclone.transport
@@ -43,7 +39,7 @@ primestart() {
wisword=$(/usr/games/fortune -as | sed "s/^/ /")
varstart() {
###################### FOR VARIABLES ROLE SO DOESNT CREATE RED - START
###################### FOR VARIABLS ROLE SO DOESNT CREATE RED - START
filevg="/var/plexguide"
if [ ! -e "$filevg" ]; then
mkdir -p $filevg/logs 1>/dev/null 2>&1
@@ -57,7 +53,7 @@ varstart() {
chmod -R 775 $fileag 1>/dev/null 2>&1
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.version "NOT-SET"
variable $filevg/tld.program "NOT-SET"
@@ -70,7 +66,6 @@ varstart() {
variable $filevg/transcode.path "standard"
variable $filevg/pgclone.transport "NOT-SET"
variable $filevg/plex.claim ""
variable $filevg/auto.update "NOT-SET"
#### Temp Fix - Fixes Bugged AppGuard
serverht=$(cat /var/plexguide/server.ht)
@@ -158,32 +153,65 @@ menuprime1
else menuprime2; fi
}
menuprime1() { # GCE Optimised Menu
menuprime1() {
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
ports=$(cat /var/plexguide/server.ports)
if [ "$ports" == "" ]; then
echo "Open" >$filevg/pg.ports
else echo "Closed" >$filevg/pg.ports; fi
ports="OPEN"
else ports="CLOSED"; fi
tee <<-EOF
-- GCE optimized surface --
[1] Traefik : Reverse Proxy | Domain Setup
[1] PTS-Traefik : Reverse Proxy
[2] Port Guard : [$ports] Protects the Server App Ports
[3] Authelia : Enable Authelia
[4] Mount : Mount Cloud Based Storage
[5] Apps : Apps ~ Core, Community & Removal
[6] Vault : Backup & Restore
[7] Traktarr : Fill arrs with Trakt lists
[3] PTS-Shield : Enable Google's OAuthentication Protection
[4] PTS-Clone : Mount Transport
[5] PTS-Apps : Apps
[6] PTS-Vault : Backup & Restore
[7] Traktarr : Fill Sonarr/Radarr over Trakt lists.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Z] Exit
"$wisword"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
end_menu
# Standby
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in
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 ;;
4) clear && bash /opt/plexguide/menu/pgcloner/pgclone.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 ;;
z) clear && bash /opt/plexguide/menu/interface/ending.sh && exit ;;
Z) clear && bash /opt/plexguide/menu/interface/ending.sh && exit ;;
*) primestart ;;
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
}
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
menuprime2() {
transport=$(cat /var/plexguide/pg.transport)
top_menu
disk_space_used_space
main_menu
# 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
ports=$(cat /var/plexguide/server.ports)
if [ "$ports" == "" ]; then
ports="🔴 "
else ports="🟢"; fi
ports="OPEN"
else ports="CLOSED"; fi
#if [[ "${typed}" == "2" ]]; then sub_menu_security; fi
end_menu
# Standby
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
tee <<-EOF
[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
Used disk space: $used of $capacity | $percentage used capacity Deployed
"$wisword"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
main_menu_options() {
# Standby
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case $typed in
1) clear && networking;;
2) clear && security && clear && primestart;;
3) clear && mount && clear && primestart;;
4) clear && apps && clear && primestart;;
5) clear && vault && clear && primestart;;
esac
}
case $typed in
1) clear && networking && clear && primestart ;;
2) clear && security && clear && primestart ;;
3) clear && mount && clear && primestart;;
4) clear && apps && clear && primestart;;
5) clear && vault && 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 ;;
1) clear && bash /opt/plexguide/menu/pgcloner/traefik.sh && clear && primestart ;;
2) clear && bash /opt/plexguide/menu/portguard/portguard.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 ;;
5) clear && bash /opt/plexguide/menu/pgbox/select.sh && clear && primestart ;;
6) clear && bash /opt/plexguide/menu/pgscan/pgscan.sh && clear && primestart ;;
7) clear && bash /opt/plexguide/menu/pgcloner/pgpress.sh && clear && primestart ;;
8) clear && bash /opt/plexguide/menu/pgcloner/pgvault.sh && clear && primestart ;;
9) clear && bash /opt/plexguide/menu/interface/cloudselect.sh && clear && primestart ;;
10) clear && bash /opt/plexguide/menu/plex_dupe/plex_dupe.sh && clear && primestart ;;
11) clear && bash /opt/plexguide/menu/traktarr/traktarr.sh && clear && primestart ;;
12) clear && bash /opt/plexguide/menu/plexpatrol/plexpatrol.sh && clear && primestart ;;
13) 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 ;;
*) 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
}
#bash /opt/plexguide/menu/pgbox/select.sh && clear && primestart ;; this is for apps
primestart

View File

@@ -10,7 +10,7 @@
mkdir -p /var/plexguide/traktarr/
# FUNCTIONS START ##############################################################
typed="${typed,,}"
# FIRST FUNCTION
variable() {
file="$1"
@@ -31,7 +31,7 @@ sonarrcheck() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Sonarr is not Installed/Running! Cannot Proceed!
WARNING! - Sonarr is not Installed/Running! Cannot Proceed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -47,7 +47,7 @@ radarrcheck() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Radarr is not Installed/Running! Cannot Proceed!
WARNING! - Radarr is not Installed/Running! Cannot Proceed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -82,7 +82,7 @@ Go Back? Type > exit
EOF
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
else
tee <<-EOF
@@ -91,13 +91,13 @@ EOF
✅ SYSTEM MESSAGE: Sonarr Path Completed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Quality Set Is: ${typed}
Quality Set Is: $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
echo "${typed}" >/var/plexguide/traktarr/pgtrak.sprofile
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "$typed" >/var/plexguide/traktarr/pgtrak.sprofile
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1
fi
}
@@ -128,7 +128,7 @@ Go Back? Type > exit
EOF
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
else
tee <<-EOF
@@ -137,12 +137,12 @@ EOF
✅ SYSTEM MESSAGE: Radarr Path Completed!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Quality Set Is: ${typed}
Quality Set Is: $typed
EOF
echo "${typed}" >/var/plexguide/traktarr/pgtrak.rprofile
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "$typed" >/var/plexguide/traktarr/pgtrak.rprofile
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1
fi
}
@@ -170,11 +170,11 @@ Go Back? Type > exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
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
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
else
tee <<-EOF
@@ -190,7 +190,7 @@ INFO: Messed up? Rerun this API Interface to update the information!
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1
fi
}
@@ -218,24 +218,24 @@ Go Back? Type > exit
EOF
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
else
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking Path $typed
🚀 SYSTEM MESSAGE: Checking Path $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1.5
##################################################### TYPED CHECKERS - START
typed2=${typed}
typed2=$typed
bonehead=no
##### 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
typed="/${typed}"
typed="/$typed"
fi
##### If user added a / at the end, we fix for them
initial="${typed: -1}"
@@ -247,14 +247,14 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking if Location is Valid
🚀 SYSTEM MESSAGE: Checking if Location is Valid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
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
tee <<-EOF
@@ -266,20 +266,20 @@ EOF
EOF
### Removes /mnt if /mnt/unionfs exists
#check=$(echo ${typed} | head -c 12)
#check=$(echo $typed | head -c 12)
#if [ "$check" == "/mnt/unionfs" ]; then
#typed=${typed:4}
#fi
echo "${typed}" >/var/plexguide/traktarr/pgtrak.spath
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "$typed" >/var/plexguide/traktarr/pgtrak.spath
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo ""
question1
else
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
your location.
@@ -288,7 +288,7 @@ Advice: Exit PTS and (Test) Type >>> mkdir $typed/testfolder
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "" && question1
fi
fi
@@ -320,24 +320,24 @@ Go Back? Type > exit
EOF
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
else
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking Path $typed
🚀 SYSTEM MESSAGE: Checking Path $typed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 1.5
##################################################### TYPED CHECKERS - START
typed2=${typed}
typed2=$typed
bonehead=no
##### 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
typed="/${typed}"
typed="/$typed"
fi
##### If user added a / at the end, we fix for them
initial="${typed: -1}"
@@ -349,14 +349,14 @@ EOF
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 SYSTEM MESSAGE: Checking if Location is Valid
🚀 SYSTEM MESSAGE: Checking if Location is Valid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
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
tee <<-EOF
@@ -366,25 +366,25 @@ EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
echo "${typed}" >/var/plexguide/traktarr/pgtrak.rpath
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "$typed" >/var/plexguide/traktarr/pgtrak.rpath
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo ""
question1
else
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
your location.
Advice: Exit PTS and (Test) Type >>> mkdir ${typed}/testfolder
Advice: Exit PTS and (Test) Type >>> mkdir $typed/testfolder
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
echo "" && question1
fi
fi
@@ -400,7 +400,7 @@ maxyear() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Limit the maximum allowed year for traktarr
🚀 Limit the maximum allowed year for traktarr
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Set a Year between [ $mnyear ] and [ $mxyear ]
@@ -408,8 +408,8 @@ Set a Year between [ $mnyear ] and [ $mxyear ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" -ge "$mnyear" && "${typed}" -le "$mxyear" ]]; then
echo "${typed}" >/var/plexguide/traktarr/pgtrakyear.max && question1
if [[ "$typed" -ge "$mnyear" && "$typed" -le "$mxyear" ]]; then
echo "$typed" >/var/plexguide/traktarr/pgtrakyear.max && question1
else maxyear ; fi
}
@@ -420,7 +420,7 @@ minyear() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Limit the minimum allowed year for traktarr
🚀 Limit the minimum allowed year for traktarr
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Set a Year between [ $mnyear ] and [ $mxyear ]
@@ -428,8 +428,8 @@ Set a Year between [ $mnyear ] and [ $mxyear ]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
if [[ "${typed}" -ge "$mnyear" && "${typed}" -le "$mxyear" ]]; then
echo "${typed}" >/var/plexguide/traktarr/pgtrakyear.min && question1
if [[ "$typed" -ge "$mnyear" && "$typed" -le "$mxyear" ]]; then
echo "$typed" >/var/plexguide/traktarr/pgtrakyear.min && question1
else minyear ; fi
}
@@ -438,7 +438,7 @@ lang() {
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.
@@ -458,7 +458,7 @@ Spain
EOF
read -p '↘️ Type your language profile from Sonarr | Press [ENTER]: ' typed </dev/tty
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
question1
else
@@ -474,7 +474,7 @@ EOF
If this is wrong now, traktarr will not work 100%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1
fi
}
@@ -484,7 +484,7 @@ avbila() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Set minimum availability movies for Radarr
🚀 Set minimum availability movies for Radarr
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The minimum availability for movies are actually set to
@@ -520,7 +520,7 @@ credits() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 traktarr Credits
🚀 traktarr Credits
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$chk
@@ -552,7 +552,7 @@ prefill() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 traktarr prefilling the system
🚀 traktarr prefilling the system
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[1] Prefilling allowed (Runs a daily job that grabs up to 50 shows and
@@ -580,7 +580,7 @@ EOF
# BAD INPUT
badinput() {
echo
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
read -p ' ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
question1
}
@@ -590,7 +590,7 @@ endbanner() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 traktarr Commands
🚀 traktarr Commands
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$chk
@@ -628,7 +628,7 @@ checkcase() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Sonarr/Radarr is not Installed/Running!
WARNING! - Sonarr/Radarr is not Installed/Running!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
@@ -639,7 +639,7 @@ checkcase() {
elif [[ "$radarr" = "radarr" ]] && [[ "$sonarr" = "" ]]; then
echo "⛔ WARNING! - Traktarr will only work for movies! Sonarr Not Running!" >/var/plexguide/traktarr/docker.status
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() {
@@ -662,7 +662,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Traktarr Interface
🚀 Traktarr Interface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$status
@@ -693,7 +693,7 @@ EOF
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
case ${typed} in
case $typed in
1) api && question1 ;;
2) spath && question1 ;;
3) rpath && question1 ;;
@@ -709,37 +709,37 @@ EOF
if [ "$radarr" == "" ] && [ "$sonarr" == "" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Sonarr or Radarr must be Running!
WARNING! - Sonarr or Radarr must be Running!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
question1
else
if [ "$sonarr" = "sonarr" ] && [ "$radarr" = "" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Traktarr will only work for shows! Radarr Not Running!
WARNING! - Traktarr will only work for shows! Radarr Not Running!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi
if [ "$radarr" = "radarr" ] && [ "$sonarr" = "" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNING! - Traktarr will only work for movies! Sonarr Not Running!
WARNING! - Traktarr will only work for movies! Sonarr Not Running!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi
if [ "$radarr" = "radarr" ] && [ "$sonarr" = "sonarr" ]; then
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛈 Traktarr - Radarr and Sonarr detected | it will work for both
🚀 Traktarr - Radarr and Sonarr detected | it will work for both
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi
file="/opt/appdata/radarr/config.xml"

View File

@@ -5,175 +5,14 @@
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
program=$(cat /tmp/program_var)
cname=$program
if [[ -f "/var/plexguide/$program.cname" ]]; then
cname=$(cat /var/plexguide/$program.cname)
fi
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
mainstart() {
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
chown -cR 100:1000 /opt/ptsupdate 1>/dev/null 2>&1
chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1
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
}
endline() {
tee <<-EOF

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 KiB

View File

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