mirror of
https://github.com/MHA-Team/PTS-Team.git
synced 2026-02-03 14:03:25 +00:00
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ menu/start.sh
|
||||
menu/hcloud/LICENSE
|
||||
menu/gce/functions/oldfile.sh
|
||||
|
||||
.vscode/sftp.json
|
||||
|
||||
2772
CHANGELOG.md
2772
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
106
README.md
106
README.md
@@ -1,12 +1,28 @@
|
||||
**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.
|
||||

|
||||
|
||||
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 KINDA EXPLODED SOMEWHAT SO EXPECT TO SEE SOME CHANGES SOON! BARE WITH ME!
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
**You know who you are.** PTS is forever, others will come and go.
|
||||
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
|
||||
|
||||
_**Table of Contents**_
|
||||
|
||||
@@ -20,9 +36,9 @@ _**Table of Contents**_
|
||||
|
||||
# 1. Install
|
||||
|
||||
## (i) Backup your current server using PTS Vault before installing PTS-Team.
|
||||
## (i) Backup your current server using PTS Vault before installing Pandaura.
|
||||
|
||||
Your PTS backup can be used to restore your applications in PTS fork after install (see later)
|
||||
Your PTS backup can be used to restore your applications in Pandaura 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`
|
||||
@@ -43,95 +59,65 @@ sudo wget -N https://raw.githubusercontent.com/MHA-Team/PTS-Clone/final/function
|
||||
```
|
||||
|
||||
|
||||
## (ii) Installing PTS
|
||||
## (ii) Installing Pandaura
|
||||
|
||||
**NOTE**
|
||||
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.
|
||||
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.
|
||||
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 PTS fork:
|
||||
Type or paste the following to install Pandaura 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/MHA-Team/Install/master/install.sh | sudo bash
|
||||
sudo wget -qO- https://raw.githubusercontent.com/Pandaura/Install/master/install.sh | sudo bash
|
||||
|
||||
```
|
||||
|
||||
The installation will then take you through the setup which is self-explanatory.
|
||||
|
||||
### 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:
|
||||
|
||||
### 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
|
||||
```
|
||||
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 wget -qO- https://raw.githubusercontent.com/Pandaura/Install/master/relocate.sh | sudo bash
|
||||
|
||||
sudo ptsupdate
|
||||
|
||||
```
|
||||
|
||||
### Testing Only - Not Supported - Install PTS-Team fork via Windows 10 20H1 WSL2 Ubuntu 18.04
|
||||
## Configuring 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.
|
||||
Then type the following to run the Pandaura menu: `sudo pandaura`
|
||||
|
||||
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.
|
||||
* Set up and deploy Traefik ([see here](https://github.com/Pandaura/PTS-Team/wiki/Traefik))
|
||||
|
||||
* 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
|
||||
* Close ports using Port Guard ([see here](https://github.com/Pandaura/PTS-Team/wiki/PTS-Port-Guard))
|
||||
|
||||
## Configuring PTS
|
||||
* Deploy Pandaura Shield (GOAuth - all apps supported) [see here](https://github.com/Pandaura/PTS-Team/wiki/PTS-Shield)
|
||||
|
||||
Configuring PTS fork is the same as configuring PG / PlexGuide.
|
||||
* 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)
|
||||
|
||||
Then type the following to run the PTS menu: `sudo pts`
|
||||
* (Optional) Restore PTS backup (created in step 1) using Vault. [see here](https://github.com/Pandaura/PTS-Team/wiki/PTS-Vault---Data-Storage)
|
||||
|
||||
* Set up and deploy Traefik ([see here](https://github.com/MHA-Team/PTS-Team/wiki/Traefik))
|
||||
* 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)
|
||||
|
||||
* 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)
|
||||
* (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)
|
||||
|
||||
**Why do I need to change remote paths?**
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
**NOTE** PTS fork does **not** install PGUI by default.
|
||||
**NOTE** PTS does **not** install PGUI by default.
|
||||
|
||||
# 2. Project Statement
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
# 3. Functional Use
|
||||
|
||||
@@ -147,8 +133,8 @@ PTS is a **fork** of PG / Plexguide, an all-in-one media solution that deploys
|
||||
|
||||
# 4. Recommended Reading
|
||||
|
||||
[**[Click Here]**](https://github.com/MHA-Team/PTS-Team/wiki/Pre-Reading) to view the list!
|
||||
[**[Click Here]**](https://github.com/Pandaura/PTS-Team/wiki/Pre-Reading) to view the list!
|
||||
|
||||
## 5. Having Issues?
|
||||
|
||||
[**[Click Here]**](https://github.com/MHA-Team/PTS-Team/wiki/Common-Issues) for more information!
|
||||
[**[Click Here]**](https://github.com/Pandaura/PTS-Team/wiki/Common-Issues) for more information!
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Title: PTS List commands
|
||||
# Author(s): MrDoobPG
|
||||
# Author(s): Pandaura
|
||||
# GNU: General Public License v3.0
|
||||
################################################################################
|
||||
---
|
||||
@@ -26,26 +26,10 @@
|
||||
|
||||
###### Install PGBlitz
|
||||
|
||||
- name: PlexGuide
|
||||
- name: Pandaura
|
||||
template:
|
||||
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
|
||||
src: pandaura
|
||||
dest: /bin/pandaura
|
||||
force: yes
|
||||
mode: 0775
|
||||
owner: root
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
################################################################################
|
||||
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/MHA-Team/PTS-Update.git /opt/ptsupdate 1>/dev/null 2>&1
|
||||
chown -cR 1000:1000 /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
|
||||
chown -cR 1000:1000 /opt/ptsupdate 1>/dev/null 2>&1
|
||||
chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1
|
||||
|
||||
source /opt/ptsupdate/autoupdate/update.sh
|
||||
|
||||
@@ -10,9 +10,17 @@ 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
|
||||
pginstall
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/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
|
||||
@@ -6,8 +6,8 @@
|
||||
################################################################################
|
||||
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/MHA-Team/PTS-Update.git /opt/ptsupdate 1>/dev/null 2>&1
|
||||
chown -cR 1000:1000 /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
|
||||
chown -cR 1000:1000 /opt/ptsupdate 1>/dev/null 2>&1
|
||||
chmod -cR 775 /opt/ptsupdate 1>/dev/null 2>&1
|
||||
|
||||
source /opt/ptsupdate/autoupdate/update.sh
|
||||
|
||||
@@ -15,14 +15,15 @@ source /opt/plexguide/menu/functions/functions.sh
|
||||
|
||||
# FIRST QUESTION
|
||||
question1() {
|
||||
appguard=$(cat /var/plexguide/server.ht)
|
||||
if [ "$appguard" == "" ]; then
|
||||
guard="DISABLED" && opp="Enable"
|
||||
else guard="ENABLED" && opp="Disable"; fi
|
||||
typed="${typed,,}"
|
||||
appguard=$(cat /var/plexguide/server.ht)
|
||||
if [ "$appguard" == "" ]; then
|
||||
guard="DISABLED" && opp="Enable"
|
||||
else guard="ENABLED" && opp="Disable"; fi
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🌎 Welcome to AppGuard!
|
||||
🛈 Welcome to AppGuard
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⚡ Reference: http://appguard.pgblitz.com
|
||||
|
||||
@@ -33,26 +34,26 @@ Z. Exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
read -p 'Type a Number | Press [ENTER]: ' typed </dev/tty
|
||||
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
|
||||
htpasswd -cbs /var/plexguide/server.ht $user $pw
|
||||
|
||||
read -p 'Type a Number | Press [ENTER]: ' typed </dev/tty
|
||||
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
|
||||
htpasswd -cbs /var/plexguide/server.ht $user $pw
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ AppGuard - Hashed UserName & Password
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 3
|
||||
sleep 3
|
||||
else echo "" >/var/plexguide/server.ht; fi
|
||||
bash /opt/plexguide/menu/appguard/rebuild.sh
|
||||
elif [[ "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
exit
|
||||
else badinput1; fi
|
||||
bash /opt/plexguide/menu/appguard/rebuild.sh
|
||||
elif [[ "${typed,,}" == "z" ]]; then
|
||||
exit
|
||||
else badinput1; fi
|
||||
}
|
||||
|
||||
# FUNCTIONS END ##############################################################
|
||||
@@ -5,9 +5,9 @@
|
||||
command: ptsupdate
|
||||
Info : Update PTS-Edition
|
||||
|
||||
- name: PTS
|
||||
command: plexguide
|
||||
Info: Open PTS Interface
|
||||
- name: pandaura
|
||||
command: pandaura
|
||||
Info: Open Pandaura Interface
|
||||
|
||||
- name: server reboot
|
||||
command: reboot
|
||||
|
||||
@@ -18,7 +18,7 @@ question1() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⌛ Cron - Schedule Cron Jobs (Backups) | $program?
|
||||
⌛ Cron - Would you like to schedule Cron Jobs (Backups) for $program?
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[ 1 ] No
|
||||
@@ -27,13 +27,13 @@ question1() {
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
if [ "$typed" == "1" ]; then
|
||||
ansible-playbook /opt/plexguide/menu/cron/remove.yml && exit
|
||||
elif [ "$typed" == "2" ]; then
|
||||
break="on"
|
||||
else badinput; fi
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
if [ "$typed" == "1" ]; then
|
||||
ansible-playbook /opt/plexguide/menu/cron/remove.yml && exit
|
||||
elif [ "$typed" == "2" ]; then
|
||||
break="on"
|
||||
else badinput; fi
|
||||
}
|
||||
|
||||
# SECOND QUESTION
|
||||
@@ -41,10 +41,10 @@ question2() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⌛ Cron - Backup How Often?
|
||||
⌛ Cron - How often and when do you want to run backups?
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
WEEKLY
|
||||
WEEKLY BACKUP SCHEDULE
|
||||
|
||||
[ 0 / 7 ] - Sunday
|
||||
[ 1 ] - Monday
|
||||
@@ -54,7 +54,7 @@ WEEKLY
|
||||
[ 5 ] - Friday
|
||||
[ 6 ] - Saturday
|
||||
|
||||
DAILY
|
||||
DAILY BACKUPS
|
||||
[ 8 ] - Daily
|
||||
|
||||
RANDOM
|
||||
@@ -62,12 +62,12 @@ RANDOM
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" -ge "0" && "$typed" -le "7" ]]; then echo $typed >/var/plexguide/cron/cron.day && break=1;
|
||||
elif [ "$typed" == "8" ]; then echo "*" > /var/plexguide/cron/cron.day && break=1;
|
||||
elif [ "$typed" == "9" ]; then echo $RAN >/var/plexguide/cron/cron.day && break=1;
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" -ge "0" && "$typed" -le "7" ]]; then echo $typed >/var/plexguide/cron/cron.day && break=1;
|
||||
elif [ "$typed" == "8" ]; then echo "*" > /var/plexguide/cron/cron.day && break=1;
|
||||
elif [ "$typed" == "9" ]; then echo $RAN >/var/plexguide/cron/cron.day && break=1;
|
||||
else badinput; fi
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ question3() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⌛ Cron - Hour of the Day?
|
||||
⌛ Cron - Select time of the day?
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
Type an HOUR from [0 to 23]
|
||||
@@ -87,11 +87,11 @@ Type an HOUR from [0 to 23]
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type a Number | Press [ENTER]: ' typed </dev/tty
|
||||
if [[ "$typed" -ge "0" && "$typed" -le "23" ]]; then
|
||||
echo $typed >/var/plexguide/cron/cron.hour && break=1
|
||||
else badinput; fi
|
||||
|
||||
read -p '↘️ Type a Number | Press [ENTER]: ' typed </dev/tty
|
||||
if [[ "$typed" -ge "0" && "$typed" -le "23" ]]; then
|
||||
echo $typed >/var/plexguide/cron/cron.hour && break=1
|
||||
else badinput; fi
|
||||
}
|
||||
|
||||
# FUNCTIONS END ##############################################################
|
||||
|
||||
@@ -4,15 +4,176 @@
|
||||
# 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
|
||||
|
||||
# KEY VARIABLE RECALL & EXECUTION
|
||||
mkdir -p /var/plexguide/cron/
|
||||
mkdir -p /opt/appdata/plexguide/cron
|
||||
# FUNCTIONS START ##############################################################
|
||||
source /opt/plexguide/menu/functions/functions.sh
|
||||
if [[ -f "/var/plexguide/$program.cname" ]]; then
|
||||
cname=$(cat /var/plexguide/$program.cname)
|
||||
fi
|
||||
|
||||
weekrandom() {
|
||||
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
|
||||
while read p; do
|
||||
echo "$p" >/tmp/program_var
|
||||
echo $(($RANDOM % 23)) >/var/plexguide/cron/cron.hour
|
||||
@@ -47,20 +208,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/MHA-Team/PTS-Team/wiki/PTS-Cron
|
||||
Reference: https://github.com/Pandaura/PTS-Team/wiki/PTS-Cron
|
||||
|
||||
[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]
|
||||
[1] Skip - All Cron Jobs]
|
||||
[2] Manual - Select for each app]
|
||||
[3] Daily - Select random times]
|
||||
[4] 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
|
||||
|
||||
@@ -19,9 +19,9 @@ emergency(){
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ Emergency & Warning Log Generator
|
||||
⚠️ Warning
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ pginstall() {
|
||||
core docstart
|
||||
rollingpart
|
||||
portainer
|
||||
oruborus
|
||||
core motd
|
||||
core gcloud
|
||||
core cleaner
|
||||
@@ -36,7 +35,6 @@ pginstall() {
|
||||
core mountcheck
|
||||
emergency
|
||||
pgdeploy
|
||||
# oruborus
|
||||
}
|
||||
|
||||
############################################################ INSTALLER FUNCTIONS
|
||||
@@ -114,16 +112,6 @@ 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
|
||||
|
||||
@@ -11,28 +11,24 @@ 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
|
||||
|
||||
[Z] Exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[3] Simple speedtest
|
||||
|
||||
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)
|
||||
@@ -40,13 +36,13 @@ EOF
|
||||
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 ;;
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Title: ouroboros
|
||||
# GNU: General Public License v3.0
|
||||
################################################################################
|
||||
---
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
# FACTS #######################################################################
|
||||
- name: 'Ensure Monitors File Exists'
|
||||
copy:
|
||||
content: ''
|
||||
dest: '/var/plexguide/pgupdater.output'
|
||||
force: 'no'
|
||||
group: '1000'
|
||||
owner: '1000'
|
||||
mode: '0755'
|
||||
|
||||
- name: 'Register Monitor List'
|
||||
shell: 'cat /var/plexguide/pgupdater.output'
|
||||
register: 'pgupdater'
|
||||
|
||||
- name: 'Set Known Facts'
|
||||
set_fact:
|
||||
pgrole: 'ouroboros'
|
||||
- name: 'Setting {{pgrole}} Volumes'
|
||||
set_fact:
|
||||
pg_volumes:
|
||||
- '/var/run/docker.sock:/var/run/docker.sock'
|
||||
- '/etc/localtime:/etc/localtime:ro'
|
||||
- name: 'Setting {{pgrole}} ENV'
|
||||
set_fact:
|
||||
pg_env:
|
||||
LATEST: 'false' #Some containers will break if set to latest, use tag already set by setting this to false
|
||||
CLEANUP: 'true'
|
||||
INTERVAL: '86400' #cEvery 24 hours in seconds
|
||||
LOG_LEVEL: 'info'
|
||||
SELF_UPDATE: 'true'
|
||||
MONITOR: '{{pgupdater.stdout}}' #Can set to specific container only see wiki for details (https://github.com/pyouroboros/ouroboros/wiki/Usage#monitor)
|
||||
IGNORE: 'mariadb influxdb mongo postgres plexautoscan'
|
||||
LABELS_ONLY: 'false' #https://github.com/pyouroboros/ouroboros/wiki/Usage#label-enable
|
||||
LABEL_ENABLE: 'false'
|
||||
# DATA_EXPORT: 'influxdb'
|
||||
# INFLUX_URL: 'influxdb'
|
||||
# INFLUX_PORT: '8086'
|
||||
# INFLUX_USERNAME: 'admin'
|
||||
# INFLUX_PASSWORD: 'adminpass'
|
||||
# INFLUX_DATABASE: 'ouroboros'
|
||||
# INFLUX_SSL: 'false'
|
||||
# INFLUX_VERIFY_SSL 'false'
|
||||
NOTIFIERS: ''
|
||||
|
||||
# MAIN DEPLOYMENT #############################################################
|
||||
- name: 'Deploying {{pgrole}}'
|
||||
docker_container:
|
||||
name: '{{pgrole}}'
|
||||
image: 'pyouroboros/ouroboros'
|
||||
pull: yes
|
||||
volumes: '{{pg_volumes}}'
|
||||
env: '{{pg_env}}'
|
||||
restart_policy: unless-stopped
|
||||
networks:
|
||||
- name: plexguide
|
||||
aliases:
|
||||
- 'ouroboros'
|
||||
state: started
|
||||
File diff suppressed because it is too large
Load Diff
173
menu/functions/plexdance.py
Normal file
173
menu/functions/plexdance.py
Normal file
@@ -0,0 +1,173 @@
|
||||
#!/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()
|
||||
@@ -70,54 +70,6 @@
|
||||
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:
|
||||
|
||||
@@ -9,19 +9,21 @@ source /opt/plexguide/menu/functions/functions.sh
|
||||
abc="/var/plexguide"
|
||||
################################################################################
|
||||
serverid() {
|
||||
declare NF='\033[1;32m'
|
||||
declare NC='\033[0m'
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
↘️ Establishing Server ID 💬 Use One Word & Keep it Simple
|
||||
🛈 Create a Server ID - Please 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 left blank!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 1
|
||||
@@ -30,7 +32,7 @@ EOF
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ PASS: Server ID $typed Established
|
||||
🛈 Server ID $(echo -e ${NF}$typed${NC}) stored ✔️
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
echo "$typed" >${abc}/server.id
|
||||
@@ -40,19 +42,21 @@ EOF
|
||||
}
|
||||
####################################
|
||||
serveridnew() {
|
||||
declare NF='\033[1;32m'
|
||||
declare NC='\033[0m'
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
↘️ Establishing New Server ID 💬 Use One Word & Keep it Simple
|
||||
🛈 Create a Server ID - Please 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 left blank!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 1
|
||||
@@ -61,7 +65,7 @@ EOF
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ PASS: Server ID $typed Established
|
||||
🛈 Server ID $(echo -e ${NF}$typed${NC}) stored ✔️
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
echo "$typed" >${abc}/server.id
|
||||
@@ -79,7 +83,7 @@ if [[ -e "$conf" ]]; then
|
||||
rclone mkdir gdrive:/plexguide/backup/$(cat /var/plexguide/server.id) --config /opt/appdata/plexguide/rclone.conf;fi
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅ PASS: Backup folder created on GDrive
|
||||
🛈 Backup folder created on GDrive ✔️
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
fi
|
||||
@@ -94,17 +98,17 @@ status=$(cat /var/plexguide/server.id)
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
↘️ Establishing New Server ID 💬 Use One Word & Keep it Simple
|
||||
🛈 Create a Server ID - Use one word & keep it simple
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[1] Deploy New ServerID
|
||||
[2] use existing ones [ $status ]
|
||||
[1] Deploy new Server ID
|
||||
[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 ;;
|
||||
|
||||
@@ -1,71 +1,318 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Title: PTS major file
|
||||
# Title: PTS major file
|
||||
# org.Author(s): Admin9705 - Deiteq
|
||||
# Mod from MrDoob for PTS
|
||||
# GNU: General Public License v3.0
|
||||
# Mod: Pandaura - history at bottom
|
||||
# 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
|
||||
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
|
||||
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() {
|
||||
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
|
||||
rm -rf /opt/plexguide/place.holder >/dev/null 2>&1
|
||||
rm -rf /opt/plexguide/.git* >/dev/null 2>&1
|
||||
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
|
||||
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
|
||||
fi
|
||||
if [[ "$update" == "🌟 Update Available!🌟" ]]; then
|
||||
#rm -rf /opt/plexguide 1>/dev/null 2>&1
|
||||
git checkout -b dev origin/$dev 1>/dev/null 2>&1
|
||||
git pull 1>/dev/null 2>&1
|
||||
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if [[ "master" == "$dev" ]]; then
|
||||
if [[ "$BRANCH" == "dev" ]]; then
|
||||
#rm -rf /opt/plexguide 1>/dev/null 2>&1
|
||||
git checkout -b dev origin/$dev 1>/dev/null 2>&1
|
||||
git pull 1>/dev/null 2>&1
|
||||
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
|
||||
fi
|
||||
if [[ "$update" == "🌟 Update Available!🌟" ]]; then
|
||||
#rm -rf /opt/plexguide 1>/dev/null 2>&1
|
||||
git checkout -b dev origin/$dev 1>/dev/null 2>&1
|
||||
git pull 1>/dev/null 2>&1
|
||||
ansible-playbook /opt/plexguide/menu/alias/alias.yml 1>/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
missingpull() {
|
||||
file="/opt/plexguide/menu/functions/install.sh"
|
||||
if [ ! -e "$file" ]; then
|
||||
file="/opt/plexguide/menu/functions/install.sh"
|
||||
if [ ! -e "$file" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ Base folder went missing!
|
||||
⚠️ Base folder is missing!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
sleep 2
|
||||
sleep 2
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🍖 NOM NOM - Re-Downloading PTS
|
||||
🛈 Re-downloading Pandaura
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 2
|
||||
downloadpg
|
||||
sleep 2
|
||||
downloadpg
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ Repair Complete! Standby!
|
||||
🛈 Repair complete. Standby!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
sleep 2
|
||||
fi
|
||||
sleep 2
|
||||
fi
|
||||
}
|
||||
|
||||
exitcheck() {
|
||||
bash /opt/plexguide/menu/version/file.sh
|
||||
file="/var/plexguide/exited.upgrade"
|
||||
if [ ! -e "$file" ]; then
|
||||
bash /opt/plexguide/menu/interface/ending.sh
|
||||
else
|
||||
rm -rf /var/plexguide/exited.upgrade 1>/dev/null 2>&1
|
||||
echo ""
|
||||
bash /opt/plexguide/menu/interface/ending.sh
|
||||
bash /opt/plexguide/menu/version/file.sh
|
||||
file="/var/plexguide/exited.upgrade"
|
||||
if [ ! -e "$file" ]; then
|
||||
bash /opt/plexguide/menu/interface/ending.sh
|
||||
else
|
||||
rm -rf /var/plexguide/exited.upgrade 1>/dev/null 2>&1
|
||||
echo ""
|
||||
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
|
||||
|
||||
@@ -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 lateste version
|
||||
[Y] UPDATE to latest 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 lateste version
|
||||
[Y] UPDATE to latest 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 ;;
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,7 +34,7 @@ regioncenter() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Select a GCE Region
|
||||
🛈 Select a GCE Region
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[ $profinal ]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
################################################################################
|
||||
source /opt/plexguide/menu/functions/install.sh
|
||||
emergency
|
||||
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
|
||||
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
|
||||
#
|
||||
clear
|
||||
printf '
|
||||
┌─────────────────────────────────────┐
|
||||
│ -== Team PTS ==- │
|
||||
│ -== Pandaura ==- │
|
||||
│ ————————————————————————————————————│
|
||||
│ Restart PTS: pts │
|
||||
│ Update PTS: ptsupdate │
|
||||
@@ -22,20 +22,13 @@ clear
|
||||
│ Download Your PTS Fork: pgfork │
|
||||
│ │
|
||||
│ ————————————————————————————————————│
|
||||
│ Thanks For Being Part of the Team │
|
||||
│ Thanks For being a part of the team │
|
||||
│ │
|
||||
│ Thanks to: │
|
||||
│ │
|
||||
│ Davaz, Deiteq, FlickerRate, │
|
||||
│ ClownFused, MrDoob, Sub7Seven, │
|
||||
│ TimeKills, The_Creator, Desimaniac, │
|
||||
│ l3uddz, RXWatcher, Calmcacil, │
|
||||
│ ΔLPHΔ , Maikash , Porkie │
|
||||
│ CDN_RAGE , hawkinzzz , The_DeadPool │
|
||||
│ BugHunter : Krallenkiller │
|
||||
│ Hawkinzzz, Syndrogo, Anap_ │
|
||||
│ Xaritomi, Demon, Man1234, │
|
||||
│ Pianomanx, xr3negadex, salty, │ |
|
||||
│ │
|
||||
└─────────────────────────────────────┘
|
||||
'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ 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
|
||||
|
||||
@@ -14,27 +14,27 @@ abc="/var/plexguide"
|
||||
serverid() {
|
||||
|
||||
if [[ "$start" != "$stored" ]]; then
|
||||
|
||||
clear
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
↘️ Establishing New Server ID 💬 Use One Word & Keep it Simple
|
||||
🛈 Create a Server ID - Please 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 3
|
||||
sleep 1
|
||||
serverid
|
||||
exit
|
||||
else
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ PASS: New ServerID Set
|
||||
🛈 Server ID $(echo -e ${NF}$typed${NC}) stored ✔️
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
|
||||
@@ -6,18 +6,22 @@
|
||||
# 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.
|
||||
@@ -85,7 +89,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
|
||||
@@ -95,9 +99,11 @@ touch /var/plexguide/pgui.switch
|
||||
[5] Server ID change : Change your ServerID
|
||||
[6] NVIDIA Docker Role : NVIDIA Docker
|
||||
[7] RCLONE DEDUPE
|
||||
|
||||
[99] TroubleShoot : PreInstaller
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
[T] TroubleShoot : PreInstaller
|
||||
[B] Change Branch : Change Github
|
||||
[U] Updater : Update fork automatically
|
||||
__________________________________________________________________________
|
||||
[Z] Exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -120,11 +126,38 @@ EOF
|
||||
6) nvidia && clear && setstart ;;
|
||||
7) rcdupe ;;
|
||||
###########################################################################
|
||||
99) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;;
|
||||
t) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;;
|
||||
T) bash /opt/plexguide/menu/functions/tshoot.sh && clear && setstart ;;
|
||||
B) branch && clear && setstart ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) setstart ;;
|
||||
esac
|
||||
}
|
||||
|
||||
setstart
|
||||
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
|
||||
0
menu/interface/tools.sh
Normal file
0
menu/interface/tools.sh
Normal file
@@ -7,6 +7,7 @@
|
||||
################################################################################
|
||||
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
|
||||
@@ -31,7 +32,7 @@ while [ "$break" == "no" ]; do
|
||||
read -p '↘️ Type | PRESS ENTER: ' typed
|
||||
storage=$(grep $typed /var/plexguide/ver.temp)
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
echo ""
|
||||
touch /var/plexguide/exited.upgrade
|
||||
exit
|
||||
@@ -53,7 +54,7 @@ EOF
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ SYSTEM MESSAGE: Version $storage does not exist! - Standby!
|
||||
⚠️ SYSTEM MESSAGE: Version $storage does not exist! - Standby!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 4
|
||||
|
||||
@@ -81,8 +81,4 @@ $W Storage - Cloud
|
||||
$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 ++++++++++%"
|
||||
$W TDrive | crypted : $G$tcrypt
|
||||
@@ -6,11 +6,11 @@
|
||||
# GNU: General Public License v3.0
|
||||
################################################################################
|
||||
removepoint() {
|
||||
rolevars
|
||||
|
||||
# Nothing Exist; kick user back to main menu
|
||||
frontoutput=$(cat /var/plexguide/multihd.paths)
|
||||
if [[ "$frontoutput" == "" ]]; then
|
||||
rolevars
|
||||
|
||||
# Nothing Exist; kick user back to main menu
|
||||
frontoutput=$(cat /var/plexguide/multihd.paths)
|
||||
if [[ "$frontoutput" == "" ]]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -23,18 +23,18 @@ that does not exist! EXITING!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -rp '↘️ Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
multihdstart
|
||||
fi
|
||||
|
||||
inputphase
|
||||
read -rp '↘️ Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
multihdstart
|
||||
fi
|
||||
|
||||
inputphase
|
||||
}
|
||||
|
||||
inputphase() {
|
||||
|
||||
rm -rf /var/plexguide/.tmp.removepointmenu 1>/dev/null 2>&1
|
||||
|
||||
# Starting Process
|
||||
typed="${typed,,}"
|
||||
rm -rf /var/plexguide/.tmp.removepointmenu 1>/dev/null 2>&1
|
||||
|
||||
# Starting Process
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -43,44 +43,44 @@ inputphase() {
|
||||
NOTE: Type a number selection in order to remove one of the HD/Mountpoints
|
||||
|
||||
EOF
|
||||
num=0
|
||||
while read p; do
|
||||
((num++))
|
||||
echo "[$num] $p"
|
||||
echo "[$num] $p" >>/var/plexguide/.tmp.removepointmenu
|
||||
done </var/plexguide/multihd.paths
|
||||
|
||||
num=0
|
||||
while read p; do
|
||||
((num++))
|
||||
echo "[$num] $p"
|
||||
echo "[$num] $p" >>/var/plexguide/.tmp.removepointmenu
|
||||
done </var/plexguide/multihd.paths
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
Quitting? Type >>> exit
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -rp '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
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
|
||||
|
||||
inputphase
|
||||
read -rp '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then multihdstart; fi
|
||||
if [[ "$typed" == "" ]]; then inputphase; fi
|
||||
|
||||
if [[ "$typed" -ge "1" && "$typed" -le "$num" ]]; then removepointfinal; fi
|
||||
|
||||
inputphase
|
||||
}
|
||||
|
||||
removepointfinal() {
|
||||
|
||||
cat /var/plexguide/.tmp.removepointmenu | grep "$typed" >/var/plexguide/.tmp.removepointmenu.select
|
||||
removestore=$(cat /var/plexguide/.tmp.removepointmenu.select | awk '{print $2}')
|
||||
|
||||
rm -rf /var/plexguide/.tmp.removebuild 1>/dev/null 2>&1
|
||||
num=0
|
||||
while read p; do
|
||||
if [[ "$removestore" != "$p" ]]; then echo "$p" >>/var/plexguide/.tmp.removebuild; fi
|
||||
done </var/plexguide/multihd.paths
|
||||
|
||||
rm -rf /var/plexguide/multihd.paths
|
||||
cp /var/plexguide/.tmp.removebuild /var/plexguide/multihd.paths
|
||||
|
||||
# Congrats! The Path Should Now Be Removed
|
||||
|
||||
cat /var/plexguide/.tmp.removepointmenu | grep "$typed" >/var/plexguide/.tmp.removepointmenu.select
|
||||
removestore=$(cat /var/plexguide/.tmp.removepointmenu.select | awk '{print $2}')
|
||||
|
||||
rm -rf /var/plexguide/.tmp.removebuild 1>/dev/null 2>&1
|
||||
num=0
|
||||
while read p; do
|
||||
if [[ "$removestore" != "$p" ]]; then echo "$p" >>/var/plexguide/.tmp.removebuild; fi
|
||||
done </var/plexguide/multihd.paths
|
||||
|
||||
rm -rf /var/plexguide/multihd.paths
|
||||
cp /var/plexguide/.tmp.removebuild /var/plexguide/multihd.paths
|
||||
|
||||
# Congrats! The Path Should Now Be Removed
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -97,7 +97,7 @@ through rClone!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -rp '↘️ Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
|
||||
multihdstart
|
||||
read -rp '↘️ Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
|
||||
multihdstart
|
||||
}
|
||||
|
||||
@@ -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 ]
|
||||
@@ -122,4 +122,4 @@ EOF
|
||||
}
|
||||
##########################################
|
||||
base
|
||||
api
|
||||
api
|
||||
@@ -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
|
||||
|
||||
@@ -7,216 +7,214 @@
|
||||
################################################################################
|
||||
|
||||
# FUNCTIONS START ##############################################################
|
||||
typed="${typed,,}"
|
||||
source /opt/plexguide/menu/functions/functions.sh
|
||||
|
||||
queued() {
|
||||
echo
|
||||
read -p "⛔️ ERROR - $typed already queued! | Press [ENTER] " typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p "⚠️ ERROR - ${typed} is already queued! | Press [ENTER] " typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
value() {
|
||||
bash /opt/plexguide/menu/pgbox/value.sh
|
||||
bash /opt/plexguide/menu/pgbox/value.sh
|
||||
}
|
||||
|
||||
exists() {
|
||||
echo ""
|
||||
echo "⛔️ ERROR - $typed already installed!"
|
||||
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
|
||||
|
||||
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
|
||||
part1
|
||||
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
|
||||
question1
|
||||
else exists; fi
|
||||
echo ""
|
||||
echo "⚠️ ERROR - ${typed} is already installed!"
|
||||
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
|
||||
|
||||
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
|
||||
part1
|
||||
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
|
||||
question1
|
||||
else exists; fi
|
||||
}
|
||||
|
||||
badinputcom() {
|
||||
echo ""
|
||||
echo "⛔️ ERROR - Bad Input! $typed not exist"
|
||||
echo ""
|
||||
read -p 'PRESS [ENTER] ' typed </dev/tty
|
||||
echo ""
|
||||
echo "⚠️ ERROR - Bad input! ${typed} not exist"
|
||||
echo ""
|
||||
read -p 'PRESS [ENTER] ' typed </dev/tty
|
||||
}
|
||||
|
||||
cronexe() {
|
||||
croncheck=$(cat /opt/communityapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
croncheck=$(cat /opt/communityapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
}
|
||||
|
||||
cronmass() {
|
||||
croncheck=$(cat /opt/communityapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
croncheck=$(cat /opt/communityapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
}
|
||||
|
||||
initial() {
|
||||
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgbox.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgbox.buildup
|
||||
|
||||
folder && ansible-playbook /opt/plexguide/menu/pgbox/community/community.yml >/dev/null 2>&1
|
||||
|
||||
file="/opt/communityapps/place.holder"
|
||||
waitvar=0
|
||||
while [ "$waitvar" == "0" ]; do
|
||||
sleep .5
|
||||
if [ -e "$file" ]; then waitvar=1; fi
|
||||
done
|
||||
apt-get install dos2unix -yqq
|
||||
dos2unix /opt/communityapps/apps/image/_image.sh >/dev/null 2>&1
|
||||
dos2unix /opt/communityapps/apps/_appsgen.sh >/dev/null 2>&1
|
||||
|
||||
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgbox.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgbox.buildup
|
||||
|
||||
folder && ansible-playbook /opt/plexguide/menu/pgbox/community/community.yml >/dev/null 2>&1
|
||||
|
||||
file="/opt/communityapps/place.holder"
|
||||
waitvar=0
|
||||
while [ "$waitvar" == "0" ]; do
|
||||
sleep .5
|
||||
if [ -e "$file" ]; then waitvar=1; fi
|
||||
done
|
||||
apt-get install dos2unix -yqq
|
||||
dos2unix /opt/communityapps/apps/image/_image.sh >/dev/null 2>&1
|
||||
dos2unix /opt/communityapps/apps/_appsgen.sh >/dev/null 2>&1
|
||||
|
||||
}
|
||||
|
||||
question1() {
|
||||
|
||||
### Remove Running Apps
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/app.list
|
||||
done </var/plexguide/pgbox.running
|
||||
|
||||
cp /var/plexguide/app.list /var/plexguide/app.list2
|
||||
|
||||
file="/var/plexguide/community.app"
|
||||
#if [ ! -e "$file" ]; then
|
||||
ls -la /opt/communityapps/apps | sed -e 's/.yml//g' |
|
||||
typed="${typed,,}"
|
||||
### Remove Running Apps
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/app.list
|
||||
done </var/plexguide/pgbox.running
|
||||
|
||||
cp /var/plexguide/app.list /var/plexguide/app.list2
|
||||
|
||||
file="/var/plexguide/community.app"
|
||||
#if [ ! -e "$file" ]; then
|
||||
ls -la /opt/communityapps/apps | sed -e 's/.yml//g' |
|
||||
awk '{print $9}' | tail -n +4 >/var/plexguide/app.list
|
||||
while read p; do
|
||||
echo "" >>/opt/communityapps/apps/$p.yml
|
||||
echo "##PG-Community" >>/opt/communityapps/apps/$p.yml
|
||||
|
||||
mkdir -p /opt/mycontainers
|
||||
touch /opt/appdata/plexguide/rclone.conf
|
||||
done </var/plexguide/app.list
|
||||
touch /var/plexguide/community.app
|
||||
#fi
|
||||
|
||||
#bash /opt/communityapps/apps/_appsgen.sh
|
||||
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
|
||||
|
||||
### Remove Official Apps
|
||||
while read p; do
|
||||
# reminder, need one for custom apps
|
||||
baseline=$(cat /opt/communityapps/apps/$p.yml | grep "##PG-Community")
|
||||
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
sed -i -e "/templates/d" /var/plexguide/app.list
|
||||
sed -i -e "/image/d" /var/plexguide/app.list
|
||||
sed -i -e "/_/d" /var/plexguide/app.list
|
||||
num=0
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [[ "$num" == "7" ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
notrun=$(cat /var/plexguide/program.temp)
|
||||
buildup=$(cat /var/plexguide/pgbox.output)
|
||||
|
||||
if [ "$buildup" == "" ]; then buildup="NONE"; fi
|
||||
while read p; do
|
||||
echo "" >>/opt/communityapps/apps/$p.yml
|
||||
echo "##PG-Community" >>/opt/communityapps/apps/$p.yml
|
||||
|
||||
mkdir -p /opt/mycontainers
|
||||
touch /opt/appdata/plexguide/rclone.conf
|
||||
done </var/plexguide/app.list
|
||||
touch /var/plexguide/community.app
|
||||
#fi
|
||||
|
||||
#bash /opt/communityapps/apps/_appsgen.sh
|
||||
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
|
||||
|
||||
### Remove Official Apps
|
||||
while read p; do
|
||||
# reminder, need one for custom apps
|
||||
baseline=$(cat /opt/communityapps/apps/$p.yml | grep "##PG-Community")
|
||||
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
sed -i -e "/templates/d" /var/plexguide/app.list
|
||||
sed -i -e "/image/d" /var/plexguide/app.list
|
||||
sed -i -e "/_/d" /var/plexguide/app.list
|
||||
num=0
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [[ "$num" == "7" ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
notrun=$(cat /var/plexguide/program.temp)
|
||||
buildup=$(cat /var/plexguide/pgbox.output)
|
||||
|
||||
if [ "$buildup" == "" ]; then buildup="NONE"; fi
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Multi-App Installer | Community APPS
|
||||
💼 Multi-App Installer Community Apps
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
📂 Potential Apps to Install
|
||||
📂 Potential apps to install
|
||||
|
||||
$notrun
|
||||
|
||||
💾 Apps Queued for Installation
|
||||
-------------------------------------------------------------------------
|
||||
💾 Apps below are queued for installation
|
||||
|
||||
$buildup
|
||||
|
||||
[A] Install
|
||||
|
||||
[Z] Exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
_________________________________________________________________________
|
||||
[A] Install [Z] Exit
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; 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
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then exists && question1 ; fi
|
||||
|
||||
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
|
||||
if [ "$current" == "" ]; then badinputcom && question1 ; fi
|
||||
|
||||
part1
|
||||
read -p '💬 Type an app to queue for install | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then question2; fi
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then queued && question1 ; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then exists && question1 ; fi
|
||||
|
||||
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
|
||||
if [ "$current" == "" ]; then badinputcom && question1 ; fi
|
||||
|
||||
part1
|
||||
}
|
||||
|
||||
part1() {
|
||||
echo "$typed" >>/var/plexguide/pgbox.buildup
|
||||
num=0
|
||||
|
||||
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgbox.output
|
||||
echo -n " " >>/var/plexguide/pgbox.output
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgbox.output
|
||||
fi
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/app.list
|
||||
|
||||
question1
|
||||
echo "$typed" >>/var/plexguide/pgbox.buildup
|
||||
num=0
|
||||
|
||||
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgbox.output
|
||||
echo -n " " >>/var/plexguide/pgbox.output
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgbox.output
|
||||
fi
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/app.list
|
||||
|
||||
question1
|
||||
}
|
||||
|
||||
final() {
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo
|
||||
exit
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo
|
||||
exit
|
||||
}
|
||||
|
||||
question2() {
|
||||
|
||||
# Image Selector
|
||||
image=off
|
||||
while read p; do
|
||||
|
||||
echo "$p" >/tmp/program_var
|
||||
|
||||
bash /opt/communityapps/apps/image/_image.sh
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
# Cron Execution
|
||||
edition=$(cat /var/plexguide/pg.edition)
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
else
|
||||
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
|
||||
echo "false" >/var/plexguide/cron.count
|
||||
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
|
||||
fi
|
||||
|
||||
# CName & Port Execution
|
||||
bash /opt/plexguide/menu/pgbox/cname.sh
|
||||
|
||||
while read p; do
|
||||
|
||||
# Image Selector
|
||||
image=off
|
||||
while read p; do
|
||||
|
||||
echo "$p" >/tmp/program_var
|
||||
|
||||
bash /opt/communityapps/apps/image/_image.sh
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
# Cron Execution
|
||||
edition=$(cat /var/plexguide/pg.edition)
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
else
|
||||
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
|
||||
echo "false" >/var/plexguide/cron.count
|
||||
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
|
||||
fi
|
||||
|
||||
# CName & Port Execution
|
||||
bash /opt/plexguide/menu/pgbox/cname.sh
|
||||
|
||||
while read p; do
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -224,37 +222,37 @@ $p - Now Installing!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
##### CHECK START #####
|
||||
value
|
||||
##### CHECK EXIT #####
|
||||
|
||||
# Store Used Program
|
||||
echo "$p" >/tmp/program_var
|
||||
# Execute Main Program
|
||||
ansible-playbook /opt/communityapps/apps/$p.yml
|
||||
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
elif [ "$croncount" -eq "1" ]; then cronexe; fi
|
||||
|
||||
# End Banner
|
||||
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgbox.buildup
|
||||
echo "" >>/tmp/output.info
|
||||
cat /tmp/output.info
|
||||
final
|
||||
|
||||
##### CHECK START #####
|
||||
value
|
||||
##### CHECK EXIT #####
|
||||
|
||||
# Store Used Program
|
||||
echo "$p" >/tmp/program_var
|
||||
# Execute Main Program
|
||||
ansible-playbook /opt/communityapps/apps/$p.yml
|
||||
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
elif [ "$croncount" -eq "1" ]; then cronexe; fi
|
||||
|
||||
# End Banner
|
||||
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgbox.buildup
|
||||
echo "" >>/tmp/output.info
|
||||
cat /tmp/output.info
|
||||
final
|
||||
}
|
||||
|
||||
start() {
|
||||
initial
|
||||
question1
|
||||
initial
|
||||
question1
|
||||
}
|
||||
|
||||
folder() {
|
||||
mkdir -p /opt/communityapps
|
||||
mkdir -p /opt/communityapps
|
||||
}
|
||||
|
||||
# FUNCTIONS END ##############################################################
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
- name: Cloning Community Apps
|
||||
git:
|
||||
repo: 'https://github.com/MHA-Team/Apps-Community'
|
||||
repo: 'https://github.com/Pandaura/Apps-Community'
|
||||
dest: /opt/communityapps
|
||||
version: 'master'
|
||||
force: yes
|
||||
|
||||
@@ -1,249 +1,259 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Title: PGBlitz (Reference Title File)
|
||||
# Author(s): Admin9705
|
||||
# URL: https://pgblitz.com - http://github.pgblitz.com
|
||||
# GNU: General Public License v3.0
|
||||
|
||||
################################################################################
|
||||
|
||||
# FUNCTIONS START ##############################################################
|
||||
# FUNCTIONS START ##############################################################
|
||||
source /opt/plexguide/menu/functions/functions.sh
|
||||
source /opt/plexguide/menu/functions/start.sh
|
||||
typed="${typed,,}"
|
||||
|
||||
queued() {
|
||||
echo
|
||||
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p "⛔️ ERROR - $typed is already queued! | Press [ENTER] " typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
value() {
|
||||
bash /opt/plexguide/menu/pgbox/value.sh
|
||||
bash /opt/plexguide/menu/pgbox/value.sh
|
||||
}
|
||||
|
||||
exists() {
|
||||
echo ""
|
||||
echo "⛔️ ERROR - $typed Already Installed!"
|
||||
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
|
||||
|
||||
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
|
||||
part1
|
||||
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
|
||||
question1
|
||||
else exists; fi
|
||||
echo ""
|
||||
echo "⛔️ ERROR - $typed is already installed!"
|
||||
read -p "⚠️ Would you like to reinstall $typed? [Y/N] | Press [ENTER] " foo </dev/tty
|
||||
|
||||
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
|
||||
part1
|
||||
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
|
||||
question1
|
||||
else exists; fi
|
||||
}
|
||||
|
||||
badinputcore() {
|
||||
echo ""
|
||||
echo "⛔️ ERROR - Bad Input! $typed not exist"
|
||||
echo ""
|
||||
read -p 'PRESS [ENTER] ' typed </dev/tty
|
||||
echo ""
|
||||
echo "⛔️ ERROR - Bad input! $typed not exist"
|
||||
echo ""
|
||||
read -p 'PRESS [ENTER] ' typed </dev/tty
|
||||
}
|
||||
|
||||
cronexe() {
|
||||
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
}
|
||||
|
||||
cronmass() {
|
||||
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
}
|
||||
|
||||
initial() {
|
||||
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgbox.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgbox.buildup
|
||||
|
||||
folder && ansible-playbook /opt/plexguide/menu/pgbox/core/core.yml >/dev/null 2>&1
|
||||
|
||||
file="/opt/coreapps/place.holder"
|
||||
waitvar=0
|
||||
while [ "$waitvar" == "0" ]; do
|
||||
sleep .5
|
||||
if [ -e "$file" ]; then waitvar=1; fi
|
||||
done
|
||||
apt-get install dos2unix -yqq
|
||||
dos2unix /opt/coreapps/apps/image/_image.sh >/dev/null 2>&1
|
||||
dos2unix /opt/coreapps/apps/_appsgen.sh >/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgbox.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgbox.buildup
|
||||
|
||||
folder && ansible-playbook /opt/plexguide/menu/pgbox/core/core.yml >/dev/null 2>&1
|
||||
|
||||
file="/opt/coreapps/place.holder"
|
||||
waitvar=0
|
||||
while [ "$waitvar" == "0" ]; do
|
||||
sleep .5
|
||||
if [ -e "$file" ]; then waitvar=1; fi
|
||||
done
|
||||
apt-get install dos2unix -yqq
|
||||
dos2unix /opt/coreapps/apps/image/_image.sh >/dev/null 2>&1
|
||||
dos2unix /opt/coreapps/apps/_appsgen.sh >/dev/null 2>&1
|
||||
}
|
||||
|
||||
question1() {
|
||||
|
||||
### Remove Running Apps
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/app.list
|
||||
done </var/plexguide/pgbox.running
|
||||
|
||||
cp /var/plexguide/app.list /var/plexguide/app.list2
|
||||
|
||||
file="/var/plexguide/core.app"
|
||||
#if [ ! -e "$file" ]; then
|
||||
ls -la /opt/coreapps/apps | sed -e 's/.yml//g' |
|
||||
typed="${typed,,}"
|
||||
### Remove Running Apps
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/app.list
|
||||
done </var/plexguide/pgbox.running
|
||||
|
||||
cp /var/plexguide/app.list /var/plexguide/app.list2
|
||||
|
||||
file="/var/plexguide/core.app"
|
||||
#if [ ! -e "$file" ]; then
|
||||
ls -la /opt/coreapps/apps | sed -e 's/.yml//g' |
|
||||
awk '{print $9}' | tail -n +4 >/var/plexguide/app.list
|
||||
while read p; do
|
||||
echo "" >>/opt/coreapps/apps/$p.yml
|
||||
echo "##PG-Core" >>/opt/coreapps/apps/$p.yml
|
||||
|
||||
mkdir -p /opt/mycontainers
|
||||
touch /opt/appdata/plexguide/rclone.conf
|
||||
done </var/plexguide/app.list
|
||||
touch /var/plexguide/core.app
|
||||
#fi
|
||||
|
||||
#bash /opt/coreapps/apps/_appsgen.sh
|
||||
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
|
||||
|
||||
### Remove Official Apps
|
||||
while read p; do
|
||||
# reminder, need one for custom apps
|
||||
baseline=$(cat /opt/coreapps/apps/$p.yml | grep "##PG-Core")
|
||||
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
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
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [[ "$num" == "7" ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
notrun=$(cat /var/plexguide/program.temp)
|
||||
buildup=$(cat /var/plexguide/pgbox.output)
|
||||
|
||||
if [ "$buildup" == "" ]; then buildup="NONE"; fi
|
||||
while read p; do
|
||||
echo "" >>/opt/coreapps/apps/$p.yml
|
||||
echo "##PG-Core" >>/opt/coreapps/apps/$p.yml
|
||||
|
||||
mkdir -p /opt/mycontainers
|
||||
touch /opt/appdata/plexguide/rclone.conf
|
||||
done </var/plexguide/app.list
|
||||
touch /var/plexguide/core.app
|
||||
#fi
|
||||
|
||||
#bash /opt/coreapps/apps/_appsgen.sh
|
||||
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
|
||||
|
||||
### Remove Official Apps
|
||||
while read p; do
|
||||
# reminder, need one for custom apps
|
||||
baseline=$(cat /opt/coreapps/apps/$p.yml | grep "##PG-Core")
|
||||
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
### Blank Out Temp List
|
||||
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
|
||||
num=$((num + 1))
|
||||
if [[ "$num" == "7" ]]; then
|
||||
num=0
|
||||
echo " " >>$tempfile
|
||||
fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
notrun=$(cat $tempfile)
|
||||
buildup=$(cat /var/plexguide/pgbox.output)
|
||||
|
||||
if [ "$buildup" == "" ]; then buildup="NONE"; fi # make this tidy by removing from list once added
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Multi-App Installer | Core Edition
|
||||
💼 Multi-App Installer Core Apps
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
📂 Potential Apps to Install
|
||||
📂 Potential apps to install - Installed apps will be $(echo -e ${NF}GREEN${NC})
|
||||
|
||||
$notrun
|
||||
|
||||
💾 Apps Queued for Installation
|
||||
-------------------------------------------------------------------------
|
||||
💾 Apps below are queued for installation
|
||||
|
||||
$buildup
|
||||
|
||||
[A] Install
|
||||
|
||||
[Z] Exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
_________________________________________________________________________
|
||||
[A] Install
|
||||
|
||||
EOF
|
||||
read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; 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
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then exists && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
|
||||
if [ "$current" == "" ]; then badinputcore && question1; fi
|
||||
|
||||
part1
|
||||
end_menu
|
||||
read -p '💬 Type an app to queue for install | Press [ENTER]: ' typed </dev/tty #convert to lowercase all the fucking time
|
||||
|
||||
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then question2; fi
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then queued && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then exists && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
|
||||
if [ "$current" == "" ]; then badinputcore && question1; fi
|
||||
|
||||
part1
|
||||
}
|
||||
|
||||
part1() {
|
||||
echo "$typed" >>/var/plexguide/pgbox.buildup
|
||||
num=0
|
||||
|
||||
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgbox.output
|
||||
echo -n " " >>/var/plexguide/pgbox.output
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgbox.output
|
||||
fi
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/app.list
|
||||
|
||||
question1
|
||||
echo "$typed" >>/var/plexguide/pgbox.buildup
|
||||
num=0
|
||||
|
||||
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgbox.output
|
||||
echo -n " " >>/var/plexguide/pgbox.output
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgbox.output
|
||||
fi
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/app.list
|
||||
|
||||
question1
|
||||
}
|
||||
|
||||
final() {
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo
|
||||
exit
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo
|
||||
exit
|
||||
}
|
||||
|
||||
question2() {
|
||||
|
||||
# Image Selector
|
||||
image=off
|
||||
while read p; do
|
||||
|
||||
echo "$p" >/tmp/program_var
|
||||
|
||||
bash /opt/coreapps/apps/image/_image.sh
|
||||
|
||||
# CName & Port Execution
|
||||
bash /opt/plexguide/menu/pgbox/cname.sh
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
# Cron Execution
|
||||
edition=$(cat /var/plexguide/pg.edition)
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
else
|
||||
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
|
||||
echo "false" >/var/plexguide/cron.count
|
||||
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
|
||||
fi
|
||||
|
||||
while read p; do
|
||||
|
||||
# Image Selector
|
||||
image=off
|
||||
while read p; do
|
||||
|
||||
echo "$p" >/tmp/program_var
|
||||
|
||||
bash /opt/coreapps/apps/image/_image.sh
|
||||
|
||||
# CName & Port Execution
|
||||
bash /opt/plexguide/menu/pgbox/cname.sh
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
# Cron Execution
|
||||
edition=$(cat /var/plexguide/pg.edition)
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
else
|
||||
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
|
||||
echo "false" >/var/plexguide/cron.count
|
||||
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
|
||||
fi
|
||||
|
||||
while read p; do
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
$p - Now Installing!
|
||||
$p - Is now installing...
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
sleep 1
|
||||
value
|
||||
# Store Used Program
|
||||
echo "$p" >/tmp/program_var
|
||||
# Execute Main Program
|
||||
ansible-playbook /opt/coreapps/apps/$p.yml
|
||||
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
elif [ "$croncount" -eq "1" ]; then cronexe; fi
|
||||
|
||||
# End Banner
|
||||
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgbox.buildup
|
||||
echo "" >>/tmp/output.info
|
||||
cat /tmp/output.info
|
||||
final
|
||||
|
||||
sleep 1
|
||||
value
|
||||
# Store Used Program
|
||||
echo "$p" >/tmp/program_var
|
||||
# Execute Main Program
|
||||
ansible-playbook /opt/coreapps/apps/$p.yml
|
||||
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
elif [ "$croncount" -eq "1" ]; then cronexe; fi
|
||||
|
||||
# End Banner
|
||||
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgbox.buildup
|
||||
echo "" >>/tmp/output.info
|
||||
cat /tmp/output.info
|
||||
final
|
||||
}
|
||||
|
||||
|
||||
@@ -254,10 +264,16 @@ start() {
|
||||
}
|
||||
|
||||
folder() {
|
||||
mkdir -p /opt/coreapps
|
||||
mkdir -p /opt/coreapps
|
||||
}
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
- name: Cloning Core Apps
|
||||
git:
|
||||
repo: 'https://github.com/MHA-Team/Apps-Core'
|
||||
repo: 'https://github.com/Pandaura/Apps-Core'
|
||||
dest: /opt/coreapps
|
||||
version: 'master'
|
||||
force: yes
|
||||
|
||||
79
menu/pgbox/core/script.sh
Normal file
79
menu/pgbox/core/script.sh
Normal file
@@ -0,0 +1,79 @@
|
||||
#!/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
|
||||
@@ -1,23 +1,185 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Title: MHA-Team
|
||||
# Author(s): iDoMnCi
|
||||
# URL: https://github.com/MHA-Team/MHA-Team
|
||||
# Title: PGBlitz (Reference Title File)
|
||||
# Author(s): Admin9705 - Deiteq
|
||||
# URL: https://pgblitz.com - http://github.pgblitz.com
|
||||
# GNU: General Public License v3.0
|
||||
################################################################################
|
||||
typed="${typed,,}"
|
||||
program=$(cat /tmp/program_var)
|
||||
cname=$program
|
||||
|
||||
# FUNCTIONS START ##############################################################
|
||||
source /opt/plexguide/menu/functions/functions.sh
|
||||
if [[ -f "/var/plexguide/$program.cname" ]]; then
|
||||
cname=$(cat /var/plexguide/$program.cname)
|
||||
fi
|
||||
|
||||
queued() {
|
||||
echo
|
||||
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
|
||||
appselect
|
||||
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
|
||||
}
|
||||
|
||||
badinput() {
|
||||
echo ""
|
||||
echo "⛔️ ERROR - Bad Input! $typed not exist"
|
||||
echo "⚠️ ERROR - Bad Input! $typed not exist"
|
||||
echo ""
|
||||
read -p 'PRESS [ENTER] ' typed </dev/tty
|
||||
}
|
||||
@@ -77,7 +239,7 @@ appselect() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Multi-App Auto Updater
|
||||
🛈 Multi-App Auto Updater
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
📂 Potential Apps to Auto Update
|
||||
@@ -97,9 +259,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" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; fi
|
||||
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then start; fi
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then exit; fi
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then queued && appselect; fi
|
||||
@@ -141,19 +303,6 @@ complete() {
|
||||
exit
|
||||
}
|
||||
|
||||
question2() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
Rebuilding Ouroboros!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
ansible-playbook /opt/plexguide/menu/functions/ouroboros.yml
|
||||
complete
|
||||
}
|
||||
|
||||
start() {
|
||||
startup
|
||||
appselect
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#!/bin/bash
|
||||
channelsdvr() {
|
||||
hdpath=$(cat /var/plexguide/server.hd.path)
|
||||
|
||||
typed="${typed,,}"
|
||||
hdpath=$(cat /var/plexguide/server.hd.path)
|
||||
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
📁 Channels-DVR local Path
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
NOTE: In order for this to work, you must set the PATH
|
||||
NOTE: In order for this to work, you must set the PATH
|
||||
to where Channels-DVR can save the local files.
|
||||
|
||||
Possible folder
|
||||
@@ -20,47 +21,47 @@ $hdpath/dvrfolder
|
||||
Go Back? Type > exit
|
||||
|
||||
EOF
|
||||
read -p '↘️ Type channelsdvr local Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
exit 0
|
||||
else
|
||||
read -p '↘️ Type channelsdvr local Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
exit 0
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 SYSTEM MESSAGE: Checking Path $typed
|
||||
🛈 SYSTEM MESSAGE: Checking Path $typed
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 1.5
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
typed2=$typed
|
||||
bonehead=no
|
||||
##### If user forgot to add a / in the beginning, we fix for them
|
||||
initial="$(echo $typed | head -c 1)"
|
||||
if [ "$initial" != "/" ]; then
|
||||
typed="/$typed"
|
||||
fi
|
||||
##### If user added a / at the end, we fix for them
|
||||
initial="${typed: -1}"
|
||||
if [ "$initial" == "/" ]; then
|
||||
typed=${typed::-1}
|
||||
fi
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
sleep 1.5
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
typed2=$typed
|
||||
bonehead=no
|
||||
##### If user forgot to add a / in the beginning, we fix for them
|
||||
initial="$(echo $typed | head -c 1)"
|
||||
if [ "$initial" != "/" ]; then
|
||||
typed="/$typed"
|
||||
fi
|
||||
##### If user added a / at the end, we fix for them
|
||||
initial="${typed: -1}"
|
||||
if [ "$initial" == "/" ]; then
|
||||
typed=${typed::-1}
|
||||
fi
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
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
|
||||
|
||||
file="$typed/test"
|
||||
if [ -e "$file" ]; then
|
||||
|
||||
sleep 1.5
|
||||
|
||||
mkdir $typed/test 1>/dev/null 2>&1
|
||||
|
||||
file="$typed/test"
|
||||
if [ -e "$file" ]; then
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -68,30 +69,29 @@ EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
### Removes /mnt if /mnt/unionfs exists
|
||||
#check=$(echo $typed | head -c 12)
|
||||
#if [ "$check" == "/mnt/unionfs" ]; then
|
||||
#typed=${typed:4}
|
||||
#fi
|
||||
|
||||
echo "$typed" >/var/plexguide/channelsdvr.folder
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
else
|
||||
|
||||
### Removes /mnt if /mnt/unionfs exists
|
||||
#check=$(echo $typed | head -c 12)
|
||||
#if [ "$check" == "/mnt/unionfs" ]; then
|
||||
#typed=${typed:4}
|
||||
#fi
|
||||
|
||||
echo "$typed" >/var/plexguide/channelsdvr.folder
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔ ALERT: Path $typed DOES NOT Exist!
|
||||
⛔ ALERT: Path $typed DOES NOT Exist!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
Note: You must ensure that linux is able to READ your location.
|
||||
It's start again for you
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
channelsdvr
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
channelsdvr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
channelsdvr
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#/bin/bash
|
||||
#/bin/bash
|
||||
###plaxt.sh
|
||||
api() {
|
||||
|
||||
domain=$(cat /var/plexguide/server.domain)
|
||||
typed="${typed,,}"
|
||||
domain=$(cat /var/plexguide/server.domain)
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -24,28 +24,28 @@ Go Back? Type > exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty
|
||||
echo $typed >/var/plexguide/trakt.id
|
||||
read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty
|
||||
echo $typed >/var/plexguide/trakt.sec
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
exit 0
|
||||
else
|
||||
read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty
|
||||
echo $typed >/var/plexguide/trakt.id
|
||||
read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty
|
||||
echo $typed >/var/plexguide/trakt.sec
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
exit 0
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅ SYSTEM MESSAGE: Traktarr API Notice
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
NOTE: The API Client and Secret is set!
|
||||
NOTE: The API Client and Secret is set!
|
||||
|
||||
INFO: Messed up? Rerun this API Interface to update the information!
|
||||
|
||||
EOF
|
||||
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
fi
|
||||
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
fi
|
||||
}
|
||||
|
||||
api
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
#/bin/bash
|
||||
#/bin/bash
|
||||
####rcwebui.sh
|
||||
start0() {
|
||||
folder && rcwebui
|
||||
folder && rcwebui
|
||||
}
|
||||
|
||||
folder() {
|
||||
if [[ ! -e "/var/plexguide/rcwebui" ]]; then
|
||||
remove
|
||||
if [[ ! -e "/var/plexguide/rcwebui" ]]; then
|
||||
remove
|
||||
else create; fi
|
||||
}
|
||||
|
||||
remove() {
|
||||
rm -rf /var/plexguide/rcwebui
|
||||
mkdir -p /var/plexguide/rcwebui
|
||||
echo "NOT-SET" >/var/plexguide/rcwebui/rcuser.user
|
||||
echo "NOT-SET" >/var/plexguide/rcwebui/rcpass.pass
|
||||
rm -rf /var/plexguide/rcwebui
|
||||
mkdir -p /var/plexguide/rcwebui
|
||||
echo "NOT-SET" >/var/plexguide/rcwebui/rcuser.user
|
||||
echo "NOT-SET" >/var/plexguide/rcwebui/rcpass.pass
|
||||
}
|
||||
create() {
|
||||
mkdir -p /var/plexguide/rcwebui
|
||||
echo "NOT-SET" >/var/plexguide/rcwebui/rcuser.user
|
||||
echo "NOT-SET" >/var/plexguide/rcwebui/rcpass.pass
|
||||
mkdir -p /var/plexguide/rcwebui
|
||||
echo "NOT-SET" >/var/plexguide/rcwebui/rcuser.user
|
||||
echo "NOT-SET" >/var/plexguide/rcwebui/rcpass.pass
|
||||
}
|
||||
|
||||
rcwebui() {
|
||||
@@ -37,13 +37,13 @@ Go Back? Type > exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p '↘️ Type Username | Press [ENTER]: ' typed </dev/tty
|
||||
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" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
exit 0
|
||||
else
|
||||
read -p '↘️ Type Username | Press [ENTER]: ' typed </dev/tty
|
||||
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
|
||||
exit 0
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -55,8 +55,8 @@ Password : $(cat /var/plexguide/rcwebui/rcpass.pass)
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
fi
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
fi
|
||||
}
|
||||
|
||||
start0
|
||||
@@ -9,7 +9,7 @@ program=$(cat /tmp/program_var)
|
||||
cname=$program
|
||||
|
||||
if [[ -f "/var/plexguide/$program.cname" ]]; then
|
||||
cname=$(cat /var/plexguide/$program.cname)
|
||||
cname=$(cat /var/plexguide/$program.cname)
|
||||
fi
|
||||
|
||||
domain=$(cat /var/plexguide/server.domain)
|
||||
@@ -25,7 +25,168 @@ if [ "$program" == "plex" ]; then extra="/web"; else extra=""; fi
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🌎 Access Configuration Info
|
||||
🛈 Access Configuration Info
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
tee <<-EOF
|
||||
▫ $program:${port} <- Use this as the url when connecting another app to $program.
|
||||
EOF
|
||||
|
||||
if [ "$ports" == "" ]; then
|
||||
tee <<-EOF
|
||||
▫ $ip:${port}${extra}
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$domain" != "NOT-SET" ]; then
|
||||
if [ "$ports" == "" ]; then
|
||||
tee <<-EOF
|
||||
▫ $domain:${port}${extra}
|
||||
EOF
|
||||
fi
|
||||
tee <<-EOF
|
||||
▫ $cname.$domain${extra}
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$program" == "plex" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
First Time Plex Claim Notice
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
if [ "$domain" != "NOT-SET" ]; then
|
||||
tee <<-EOF
|
||||
▫ http://plex.${domain}:32400 <-- Use http; not https
|
||||
EOF
|
||||
fi
|
||||
|
||||
tee <<-EOF
|
||||
▫ $ip:${port}${extra}
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
💬 Manual Configuration Required
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
$program requires additional manual configuration!
|
||||
EOF
|
||||
if [[ "$program" == *"sonarr"* ]] || [[ "$program" == *"radarr"* ]] || [[ "$program" == *"lidarr"* ]] || [[ "$program" == *"qbittorrent"* ]]; then
|
||||
tee <<-EOF
|
||||
|
||||
$program requires "downloader mappings" to enable hardlinking and rapid importing.
|
||||
|
||||
If you do not have these mappings, $program can't rename and move the files on import.
|
||||
This will result in files being copied instead of moved, and it will cause other issues.
|
||||
|
||||
The mappings are on the download client settings (advanced setting), at the bottom of the page.
|
||||
|
||||
Visit https://github.com/Pandaura/PTS-Team/wiki/Remote-Path-Mappings for more information.
|
||||
|
||||
EOF
|
||||
fi
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⚠ Failure to perform manual configuration changes will cause problems!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
🌍 Visit the wiki for instructions on how to configure $program.
|
||||
|
||||
https://github.com/Pandaura/PTS-Team/wiki/$program
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
####--------
|
||||
|
||||
|
||||
if [[ "$program" == *"sabnzbd"* ]] || [[ "$program" == *"nzbget"* ]] ; then
|
||||
cclean=$(cat /var/plexguide/cloneclean)
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
💬 NOTE / INFO
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
for incomplete downloads $program used the folder $hdpath/incomplete/nzb
|
||||
for finished downloads $program used the folder $hdpath/downloads/nzb
|
||||
|
||||
beware the cloneclean is set to $cclean min
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ "$program" == *"sabnzbd"* ]] ; then
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
💬 sabnzbd api_key = $sbakey
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
fi
|
||||
if [[ "$program" == *"rutorrent"* ]] || [[ "$program" == *"qbittorrent"* ]] || [[ "$program" == *"deluge"* ]]; then
|
||||
cclean=$(cat /var/plexguide/cloneclean)
|
||||
tclean=$(($cclean*2))
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
💬 NOTE / INFO
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
for incomplete downloads $program used the folder $hdpath/incomplete/torrent
|
||||
for finished downloads $program used the folder $hdpath/downloads/torrent
|
||||
|
||||
beware the cloneclean is set to $tclean min
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
fi
|
||||
if [ "$program" == "plex" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
💬 Manual Configuration Required
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
we prefer using plex_autoscan, unlike other alternatives,
|
||||
that does not put a lot of pressure on the API of your Google Account.
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$hdpath" != "/mnt" ]; then
|
||||
sbakey=$(cat /opt/appdata/sabnzbd/sabnzbd.ini | grep "api_key" | head -n 1 | awk '{print $3}')
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
You must add /mnt self to the docker container again
|
||||
Your $hdpath is not /mnt
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
fi
|
||||
port=$(cat /tmp/program_port)
|
||||
ip=$(cat /var/plexguide/server.ip)
|
||||
ports=$(cat /var/plexguide/server.ports)
|
||||
hdpath=$(cat /var/plexguide/server.hd.path)
|
||||
|
||||
|
||||
|
||||
if [ "$program" == "plex" ]; then extra="/web"; else extra=""; fi
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🛈 Access configuration info
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
@@ -88,7 +249,7 @@ EOF
|
||||
|
||||
The mappings are on the download client settings (advanced setting), at the bottom of the page.
|
||||
|
||||
Visit https://github.com/MHA-Team/PTS-Team/wiki/Remote-Path-Mappings for more information.
|
||||
Visit https://github.com/Pandaura/PTS-Team/wiki/Remote-Path-Mappings for more information.
|
||||
|
||||
EOF
|
||||
fi
|
||||
@@ -99,7 +260,7 @@ EOF
|
||||
|
||||
🌍 Visit the wiki for instructions on how to configure $program.
|
||||
|
||||
https://github.com/MHA-Team/PTS-Team/wiki/$program
|
||||
https://github.com/Pandaura/PTS-Team/wiki/$program
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
@@ -10,125 +10,125 @@
|
||||
source /opt/plexguide/menu/functions/functions.sh
|
||||
|
||||
queued() {
|
||||
echo
|
||||
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p "⚠️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
exists() {
|
||||
echo ""
|
||||
echo "⛔️ ERROR - $typed Already Installed!"
|
||||
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
|
||||
|
||||
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
|
||||
part1
|
||||
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
|
||||
question1
|
||||
else exists; fi
|
||||
echo ""
|
||||
echo "⚠️ ERROR - $typed Already Installed!"
|
||||
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
|
||||
|
||||
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
|
||||
part1
|
||||
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
|
||||
question1
|
||||
else exists; fi
|
||||
}
|
||||
|
||||
badinputgce() {
|
||||
echo ""
|
||||
echo "⛔️ ERROR - Bad Input! $typed not exist"
|
||||
echo ""
|
||||
read -p 'PRESS [ENTER] ' typed </dev/tty
|
||||
echo ""
|
||||
echo "⚠️ ERROR - Bad Input! $typed not exist"
|
||||
echo ""
|
||||
read -p 'PRESS [ENTER] ' typed </dev/tty
|
||||
}
|
||||
|
||||
cronexe() {
|
||||
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
}
|
||||
|
||||
cronmass() {
|
||||
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
croncheck=$(cat /opt/coreapps/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
}
|
||||
|
||||
initial() {
|
||||
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgbox.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgbox.buildup
|
||||
|
||||
folder && ansible-playbook /opt/plexguide/menu/pgbox/gce/gcecore.yml >/dev/null 2>&1
|
||||
|
||||
file="/opt/coreapps/place.holder"
|
||||
waitvar=0
|
||||
while [ "$waitvar" == "0" ]; do
|
||||
sleep .5
|
||||
if [ -e "$file" ]; then waitvar=1; fi
|
||||
done
|
||||
apt-get install dos2unix -yqq
|
||||
dos2unix /opt/coreapps/apps/image/_image.sh >/dev/null 2>&1
|
||||
dos2unix /opt/coreapps/apps/_appsgen.sh >/dev/null 2>&1
|
||||
|
||||
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgbox.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgbox.buildup
|
||||
|
||||
folder && ansible-playbook /opt/plexguide/menu/pgbox/gce/gcecore.yml >/dev/null 2>&1
|
||||
|
||||
file="/opt/coreapps/place.holder"
|
||||
waitvar=0
|
||||
while [ "$waitvar" == "0" ]; do
|
||||
sleep .5
|
||||
if [ -e "$file" ]; then waitvar=1; fi
|
||||
done
|
||||
apt-get install dos2unix -yqq
|
||||
dos2unix /opt/coreapps/apps/image/_image.sh >/dev/null 2>&1
|
||||
dos2unix /opt/coreapps/apps/_appsgen.sh >/dev/null 2>&1
|
||||
|
||||
}
|
||||
|
||||
question1() {
|
||||
|
||||
### Remove Running Apps
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/app.list
|
||||
done </var/plexguide/pgbox.running
|
||||
|
||||
cp /var/plexguide/app.list /var/plexguide/app.list2
|
||||
|
||||
file="/var/plexguide/core.app"
|
||||
#if [ ! -e "$file" ]; then
|
||||
ls -la /opt/coreapps/apps | sed -e 's/.yml//g' |
|
||||
|
||||
### Remove Running Apps
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/app.list
|
||||
done </var/plexguide/pgbox.running
|
||||
|
||||
cp /var/plexguide/app.list /var/plexguide/app.list2
|
||||
|
||||
file="/var/plexguide/core.app"
|
||||
#if [ ! -e "$file" ]; then
|
||||
ls -la /opt/coreapps/apps | sed -e 's/.yml//g' |
|
||||
awk '{print $9}' | tail -n +4 >/var/plexguide/app.list
|
||||
while read p; do
|
||||
echo "" >>/opt/coreapps/apps/$p.yml
|
||||
echo "##PG-Core" >>/opt/coreapps/apps/$p.yml
|
||||
|
||||
touch /opt/appdata/plexguide/rclone.conf
|
||||
done </var/plexguide/app.list
|
||||
touch /var/plexguide/core.app
|
||||
#fi
|
||||
|
||||
#bash /opt/coreapps/apps/_appsgen.sh
|
||||
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
|
||||
|
||||
### Remove Official Apps
|
||||
while read p; do
|
||||
# reminder, need one for custom apps
|
||||
baseline=$(cat /opt/coreapps/apps/$p.yml | grep "##PG-Core")
|
||||
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
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
|
||||
sed -i -e "/plex/d" /var/plexguide/app.list
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [[ "$num" == "7" ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
notrun=$(cat /var/plexguide/program.temp)
|
||||
buildup=$(cat /var/plexguide/pgbox.output)
|
||||
|
||||
if [ "$buildup" == "" ]; then buildup="NONE"; fi
|
||||
while read p; do
|
||||
echo "" >>/opt/coreapps/apps/$p.yml
|
||||
echo "##PG-Core" >>/opt/coreapps/apps/$p.yml
|
||||
|
||||
touch /opt/appdata/plexguide/rclone.conf
|
||||
done </var/plexguide/app.list
|
||||
touch /var/plexguide/core.app
|
||||
#fi
|
||||
|
||||
#bash /opt/coreapps/apps/_appsgen.sh
|
||||
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
|
||||
|
||||
### Remove Official Apps
|
||||
while read p; do
|
||||
# reminder, need one for custom apps
|
||||
baseline=$(cat /opt/coreapps/apps/$p.yml | grep "##PG-Core")
|
||||
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
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
|
||||
sed -i -e "/plex/d" /var/plexguide/app.list
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [[ "$num" == "7" ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
notrun=$(cat /var/plexguide/program.temp)
|
||||
buildup=$(cat /var/plexguide/pgbox.output)
|
||||
|
||||
if [ "$buildup" == "" ]; then buildup="NONE"; fi
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Multi-App Installer | GCE Edition
|
||||
🛈 Multi-App Installer | GCE Edition
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
📂 Potential Apps to Install
|
||||
@@ -146,75 +146,75 @@ $buildup
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; 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
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then exists && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
|
||||
if [ "$current" == "" ]; then badinputgce && question1; fi
|
||||
|
||||
part1
|
||||
read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then question2; fi
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then queued && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then exists && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
|
||||
if [ "$current" == "" ]; then badinputgce && question1; fi
|
||||
|
||||
part1
|
||||
}
|
||||
|
||||
part1() {
|
||||
echo "$typed" >>/var/plexguide/pgbox.buildup
|
||||
num=0
|
||||
|
||||
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgbox.output
|
||||
echo -n " " >>/var/plexguide/pgbox.output
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgbox.output
|
||||
fi
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/app.list
|
||||
|
||||
question1
|
||||
echo "$typed" >>/var/plexguide/pgbox.buildup
|
||||
num=0
|
||||
|
||||
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgbox.output
|
||||
echo -n " " >>/var/plexguide/pgbox.output
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgbox.output
|
||||
fi
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/app.list
|
||||
|
||||
question1
|
||||
}
|
||||
|
||||
final() {
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo
|
||||
exit
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo
|
||||
exit
|
||||
}
|
||||
|
||||
question2() {
|
||||
|
||||
# Image Selector
|
||||
image=off
|
||||
while read p; do
|
||||
|
||||
echo "$p" >/tmp/program_var
|
||||
|
||||
bash /opt/coreapps/apps/image/_image.sh
|
||||
|
||||
# CName & Port Execution
|
||||
bash /opt/plexguide/menu/pgbox/cname.sh
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
# Cron Execution
|
||||
edition=$(cat /var/plexguide/pg.edition)
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
else
|
||||
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
|
||||
echo "false" >/var/plexguide/cron.count
|
||||
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
|
||||
fi
|
||||
|
||||
while read p; do
|
||||
|
||||
# Image Selector
|
||||
image=off
|
||||
while read p; do
|
||||
|
||||
echo "$p" >/tmp/program_var
|
||||
|
||||
bash /opt/coreapps/apps/image/_image.sh
|
||||
|
||||
# CName & Port Execution
|
||||
bash /opt/plexguide/menu/pgbox/cname.sh
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
# Cron Execution
|
||||
edition=$(cat /var/plexguide/pg.edition)
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
else
|
||||
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
|
||||
echo "false" >/var/plexguide/cron.count
|
||||
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
|
||||
fi
|
||||
|
||||
while read p; do
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -222,26 +222,26 @@ $p - Now Installing!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
sleep 1
|
||||
|
||||
# Store Used Program
|
||||
echo "$p" >/tmp/program_var
|
||||
# Execute Main Program
|
||||
ansible-playbook /opt/coreapps/apps/$p.yml
|
||||
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
elif [ "$croncount" -eq "1" ]; then cronexe; fi
|
||||
|
||||
# End Banner
|
||||
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgbox.buildup
|
||||
echo "" >>/tmp/output.info
|
||||
cat /tmp/output.info
|
||||
final
|
||||
|
||||
sleep 1
|
||||
|
||||
# Store Used Program
|
||||
echo "$p" >/tmp/program_var
|
||||
# Execute Main Program
|
||||
ansible-playbook /opt/coreapps/apps/$p.yml
|
||||
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
elif [ "$croncount" -eq "1" ]; then cronexe; fi
|
||||
|
||||
# End Banner
|
||||
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgbox.buildup
|
||||
echo "" >>/tmp/output.info
|
||||
cat /tmp/output.info
|
||||
final
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ start() {
|
||||
}
|
||||
|
||||
folder() {
|
||||
mkdir -p /opt/coreapps
|
||||
mkdir -p /opt/coreapps
|
||||
}
|
||||
|
||||
# FUNCTIONS END ##############################################################
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
- name: Cloning GCE Apps
|
||||
git:
|
||||
repo: 'https://github.com/MHA-Team/Apps-GCE'
|
||||
repo: 'https://github.com/Pandaura/Apps-GCE'
|
||||
dest: /opt/coreapps
|
||||
version: 'master'
|
||||
force: yes
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
################################################################################
|
||||
|
||||
# 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
|
||||
@@ -14,119 +15,119 @@ variable /var/plexguide/boxpersonal.branch NON-SET
|
||||
|
||||
|
||||
queued() {
|
||||
echo
|
||||
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p "⚠️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
value() {
|
||||
bash /opt/plexguide/menu/pgbox/value.sh
|
||||
bash /opt/plexguide/menu/pgbox/value.sh
|
||||
}
|
||||
|
||||
exists() {
|
||||
echo ""
|
||||
echo "⛔️ ERROR - $typed Already Installed!"
|
||||
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
|
||||
|
||||
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
|
||||
part1
|
||||
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
|
||||
question1
|
||||
else exists; fi
|
||||
echo ""
|
||||
echo "⚠️ ERROR - $typed Already Installed!"
|
||||
read -p '⚠️ Reinstall? [Y/N] | Press [ENTER] ' foo </dev/tty
|
||||
|
||||
if [[ "$foo" == "y" || "$foo" == "Y" ]]; then
|
||||
part1
|
||||
elif [[ "$foo" == "n" || "$foo" == "N" ]]; then
|
||||
question1
|
||||
else exists; fi
|
||||
}
|
||||
|
||||
cronexe() {
|
||||
croncheck=$(cat /opt/mycontainers/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
croncheck=$(cat /opt/mycontainers/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
}
|
||||
|
||||
cronmass() {
|
||||
croncheck=$(cat /opt/mycontainers/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
croncheck=$(cat /opt/mycontainers/apps/_cron.list | grep -c "\<$p\>")
|
||||
if [ "$croncheck" == "0" ]; then bash /opt/plexguide/menu/cron/cron.sh; fi
|
||||
}
|
||||
|
||||
initial() {
|
||||
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgbox.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgbox.buildup
|
||||
|
||||
mkdir -p /opt/mycontainers
|
||||
|
||||
ansible-playbook /opt/plexguide/menu/pgbox/personal/personal.yml
|
||||
file="/opt/mycontainers/place.holder"
|
||||
waitvar=0
|
||||
while [ "$waitvar" == "0" ]; do
|
||||
sleep .5
|
||||
if [ -e "$file" ]; then waitvar=1; fi
|
||||
done
|
||||
|
||||
rm -rf /var/plexguide/pgbox.output 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgbox.buildup 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/app.list 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgbox.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgbox.buildup
|
||||
|
||||
mkdir -p /opt/mycontainers
|
||||
|
||||
ansible-playbook /opt/plexguide/menu/pgbox/personal/personal.yml
|
||||
file="/opt/mycontainers/place.holder"
|
||||
waitvar=0
|
||||
while [ "$waitvar" == "0" ]; do
|
||||
sleep .5
|
||||
if [ -e "$file" ]; then waitvar=1; fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
question1() {
|
||||
|
||||
### Remove Running Apps
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/app.list
|
||||
done </var/plexguide/pgbox.running
|
||||
|
||||
cp /var/plexguide/app.list /var/plexguide/app.list2
|
||||
|
||||
file="/var/plexguide/personal.app"
|
||||
#if [ ! -e "$file" ]; then
|
||||
ls -la /opt/mycontainers/apps | sed -e 's/.yml//g' |
|
||||
|
||||
### Remove Running Apps
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/app.list
|
||||
done </var/plexguide/pgbox.running
|
||||
|
||||
cp /var/plexguide/app.list /var/plexguide/app.list2
|
||||
|
||||
file="/var/plexguide/personal.app"
|
||||
#if [ ! -e "$file" ]; then
|
||||
ls -la /opt/mycontainers/apps | sed -e 's/.yml//g' |
|
||||
awk '{print $9}' | tail -n +4 >/var/plexguide/app.list
|
||||
while read p; do
|
||||
echo "" >>/opt/mycontainers/apps/$p.yml
|
||||
echo "##PG-personal" >>/opt/mycontainers/apps/$p.yml
|
||||
|
||||
mkdir -p /opt/mycontainers
|
||||
touch /opt/appdata/plexguide/rclone.conf
|
||||
done </var/plexguide/app.list
|
||||
touch /var/plexguide/personal.app
|
||||
#fi
|
||||
|
||||
#bash /opt/mycontainers/apps/_appsgen.sh
|
||||
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
|
||||
|
||||
### Remove Official Apps
|
||||
while read p; do
|
||||
# reminder, need one for custom apps
|
||||
baseline=$(cat /opt/mycontainers/apps/$p.yml | grep "##PG-personal")
|
||||
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
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
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [[ "$num" == "7" ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
notrun=$(cat /var/plexguide/program.temp)
|
||||
buildup=$(cat /var/plexguide/pgbox.output)
|
||||
|
||||
if [ "$buildup" == "" ]; then buildup="NONE"; fi
|
||||
while read p; do
|
||||
echo "" >>/opt/mycontainers/apps/$p.yml
|
||||
echo "##PG-personal" >>/opt/mycontainers/apps/$p.yml
|
||||
|
||||
mkdir -p /opt/mycontainers
|
||||
touch /opt/appdata/plexguide/rclone.conf
|
||||
done </var/plexguide/app.list
|
||||
touch /var/plexguide/personal.app
|
||||
#fi
|
||||
|
||||
#bash /opt/mycontainers/apps/_appsgen.sh
|
||||
docker ps | awk '{print $NF}' | tail -n +2 >/var/plexguide/pgbox.running
|
||||
|
||||
### Remove Official Apps
|
||||
while read p; do
|
||||
# reminder, need one for custom apps
|
||||
baseline=$(cat /opt/mycontainers/apps/$p.yml | grep "##PG-personal")
|
||||
if [ "$baseline" == "" ]; then sed -i -e "/$p/d" /var/plexguide/app.list; fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
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
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [[ "$num" == "7" ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/app.list
|
||||
|
||||
notrun=$(cat /var/plexguide/program.temp)
|
||||
buildup=$(cat /var/plexguide/pgbox.output)
|
||||
|
||||
if [ "$buildup" == "" ]; then buildup="NONE"; fi
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 PTS ~ Multi-App Installer || Personal Versions
|
||||
🛈 PTS ~ Multi-App Installer || Personal Versions
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
📂 Potential Apps to Install
|
||||
@@ -144,75 +145,75 @@ $buildup
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "deploy" || "$typed" == "Deploy" || "$typed" == "DEPLOY" || "$typed" == "install" || "$typed" == "Install" || "$typed" == "INSTALL" || "$typed" == "a" || "$typed" == "A" ]]; then question2; 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
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then exists && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
|
||||
if [ "$current" == "" ]; then badinput1 && question1; fi
|
||||
|
||||
part1
|
||||
read -p '↪️ Type app to queue install | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "deploy" || "${typed}" == "install" || "${typed}" == "a" ]]; then question2; fi
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.buildup | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then queued && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/pgbox.running | grep "\<$typed\>")
|
||||
if [ "$current" != "" ]; then exists && question1; fi
|
||||
|
||||
current=$(cat /var/plexguide/program.temp | grep "\<$typed\>")
|
||||
if [ "$current" == "" ]; then badinput1 && question1; fi
|
||||
|
||||
part1
|
||||
}
|
||||
|
||||
part1() {
|
||||
echo "$typed" >>/var/plexguide/pgbox.buildup
|
||||
num=0
|
||||
|
||||
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgbox.output
|
||||
echo -n " " >>/var/plexguide/pgbox.output
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgbox.output
|
||||
fi
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/app.list
|
||||
|
||||
question1
|
||||
echo "$typed" >>/var/plexguide/pgbox.buildup
|
||||
num=0
|
||||
|
||||
touch /var/plexguide/pgbox.output && rm -rf /var/plexguide/pgbox.output
|
||||
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgbox.output
|
||||
echo -n " " >>/var/plexguide/pgbox.output
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgbox.output
|
||||
fi
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/app.list
|
||||
|
||||
question1
|
||||
}
|
||||
|
||||
final() {
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo
|
||||
exit
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo
|
||||
exit
|
||||
}
|
||||
|
||||
question2() {
|
||||
|
||||
# Image Selector
|
||||
image=off
|
||||
while read p; do
|
||||
|
||||
echo "$p" >/tmp/program_var
|
||||
if [[ -d "/opt/mycontainers/apps/image/" ]]; then
|
||||
bash /opt/mycontainers/apps/image/_image.sh ; fi
|
||||
|
||||
# CName & Port Execution
|
||||
bash /opt/plexguide/menu/pgbox/cname.sh
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
# Cron Execution
|
||||
edition=$(cat /var/plexguide/pg.edition)
|
||||
if [[ "$edition" == "Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
else
|
||||
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
|
||||
echo "false" >/var/plexguide/cron.count
|
||||
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
|
||||
fi
|
||||
|
||||
while read p; do
|
||||
|
||||
# Image Selector
|
||||
image=off
|
||||
while read p; do
|
||||
|
||||
echo "$p" >/tmp/program_var
|
||||
if [[ -d "/opt/mycontainers/apps/image/" ]]; then
|
||||
bash /opt/mycontainers/apps/image/_image.sh ; fi
|
||||
|
||||
# CName & Port Execution
|
||||
bash /opt/plexguide/menu/pgbox/cname.sh
|
||||
done </var/plexguide/pgbox.buildup
|
||||
|
||||
# Cron Execution
|
||||
edition=$(cat /var/plexguide/pg.edition)
|
||||
if [[ "$edition" == "Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
else
|
||||
croncount=$(sed -n '$=' /var/plexguide/pgbox.buildup)
|
||||
echo "false" >/var/plexguide/cron.count
|
||||
if [ "$croncount" -ge 2 ]; then bash /opt/plexguide/menu/cron/mass.sh; fi
|
||||
fi
|
||||
|
||||
while read p; do
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -220,46 +221,46 @@ $p - Now Installing!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
sleep 1
|
||||
##### CHECK START #####
|
||||
value
|
||||
##### CHECK EXIT #####
|
||||
|
||||
# Store Used Program
|
||||
echo "$p" >/tmp/program_var
|
||||
# Execute Main Program
|
||||
ansible-playbook /opt/mycontainers/apps/$p.yml
|
||||
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
elif [ "$croncount" -eq "1" ]; then cronexe; fi
|
||||
|
||||
# End Banner
|
||||
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgbox.buildup
|
||||
echo "" >>/tmp/output.info
|
||||
cat /tmp/output.info
|
||||
final
|
||||
|
||||
sleep 1
|
||||
##### CHECK START #####
|
||||
value
|
||||
##### CHECK EXIT #####
|
||||
|
||||
# Store Used Program
|
||||
echo "$p" >/tmp/program_var
|
||||
# Execute Main Program
|
||||
ansible-playbook /opt/mycontainers/apps/$p.yml
|
||||
|
||||
if [[ "$edition" == "PG Edition - HD Solo" ]]; then
|
||||
a=b
|
||||
elif [ "$croncount" -eq "1" ]; then cronexe; fi
|
||||
|
||||
# End Banner
|
||||
bash /opt/plexguide/menu/pgbox/endbanner.sh >>/tmp/output.info
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgbox.buildup
|
||||
echo "" >>/tmp/output.info
|
||||
cat /tmp/output.info
|
||||
final
|
||||
}
|
||||
|
||||
mainbanner() {
|
||||
|
||||
boxuser=$(cat /var/plexguide/boxpersonal.user)
|
||||
boxrepo=$(cat /var/plexguide/boxpersonal.repo)
|
||||
boxbranch=$(cat /var/plexguide/boxpersonal.branch)
|
||||
|
||||
|
||||
|
||||
boxuser=$(cat /var/plexguide/boxpersonal.user)
|
||||
boxrepo=$(cat /var/plexguide/boxpersonal.repo)
|
||||
boxbranch=$(cat /var/plexguide/boxpersonal.branch)
|
||||
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 PTS personal Box Edition!
|
||||
🛈 PTS personal Box Edition!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
💬
|
||||
User: $boxuser
|
||||
💬
|
||||
User: $boxuser
|
||||
Repo: $boxrepo
|
||||
Branch: $boxbranch
|
||||
|
||||
@@ -271,11 +272,11 @@ Branch: $boxbranch
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
read -p 'Type a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1)
|
||||
|
||||
read -p 'Type a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1)
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -287,30 +288,30 @@ Username / Branch & Repo are both case sensitive!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -p 'Username | Press [ENTER]: ' boxuser </dev/tty
|
||||
read -p 'REPO | Press [ENTER]: ' boxrepo </dev/tty
|
||||
read -p 'Branch | Press [ENTER]: ' boxbranch </dev/tty
|
||||
echo "$boxuser" >/var/plexguide/boxpersonal.user
|
||||
echo "$boxrepo" >/var/plexguide/boxpersonal.repo
|
||||
echo "$boxbranch" >/var/plexguide/boxpersonal.branch
|
||||
mainbanner
|
||||
;;
|
||||
2)
|
||||
existcheck=$(git ls-remote --exit-code -h "https://github.com/$(cat /var/plexguide/boxpersonal.user)/$(cat /var/plexguide/boxpersonal.repo)" | grep "$(cat /var/plexguide/boxpersonal.branch)")
|
||||
if [ "$existcheck" == "" ]; then
|
||||
echo
|
||||
read -p '💬 Exiting! Forked Version Does Not Exist! | Press [ENTER]: ' typed </dev/tty
|
||||
mainbanner
|
||||
fi
|
||||
|
||||
initial && question1 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) mainbanner ;;
|
||||
esac
|
||||
read -p 'Username | Press [ENTER]: ' boxuser </dev/tty
|
||||
read -p 'REPO | Press [ENTER]: ' boxrepo </dev/tty
|
||||
read -p 'Branch | Press [ENTER]: ' boxbranch </dev/tty
|
||||
echo "$boxuser" >/var/plexguide/boxpersonal.user
|
||||
echo "$boxrepo" >/var/plexguide/boxpersonal.repo
|
||||
echo "$boxbranch" >/var/plexguide/boxpersonal.branch
|
||||
mainbanner
|
||||
;;
|
||||
2)
|
||||
existcheck=$(git ls-remote --exit-code -h "https://github.com/$(cat /var/plexguide/boxpersonal.user)/$(cat /var/plexguide/boxpersonal.repo)" | grep "$(cat /var/plexguide/boxpersonal.branch)")
|
||||
if [ "$existcheck" == "" ]; then
|
||||
echo
|
||||
read -p '💬 Exiting! Forked Version Does Not Exist! | Press [ENTER]: ' typed </dev/tty
|
||||
mainbanner
|
||||
fi
|
||||
|
||||
initial && question1 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) mainbanner ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# FUNCTIONS END ##############################################################
|
||||
|
||||
|
||||
echo "" >/tmp/output.info
|
||||
mainbanner
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# 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
|
||||
@@ -24,13 +25,13 @@ sed -i -e "/portainer/d" /tmp/backup.list
|
||||
#### Commenting Out To Let User See
|
||||
num=0
|
||||
while read p; do
|
||||
let "num++"
|
||||
echo -n $p >>/tmp/backup.final
|
||||
echo -n " " >>/tmp/backup.final
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/tmp/backup.final
|
||||
fi
|
||||
let "num++"
|
||||
echo -n $p >>/tmp/backup.final
|
||||
echo -n " " >>/tmp/backup.final
|
||||
if [[ "$num" == 7 ]]; then
|
||||
num=0
|
||||
echo " " >>/tmp/backup.final
|
||||
fi
|
||||
done </tmp/backup.list
|
||||
|
||||
running=$(cat /tmp/backup.final)
|
||||
@@ -39,12 +40,12 @@ running=$(cat /tmp/backup.final)
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 App Removal Interface
|
||||
🛈 App Removal Interface
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
⚠️ Backup Data if Required! Removes Local App Data!
|
||||
⚠️ This will remove your app data folder. Make sure you backup!
|
||||
|
||||
💾 Current Installed Apps or Folders
|
||||
💾 Apps currently installed
|
||||
|
||||
$running
|
||||
|
||||
@@ -55,52 +56,52 @@ $running
|
||||
EOF
|
||||
read -p '🌍 Type APP for QUEUE | Press [[ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then exit; fi
|
||||
if [[ "${typed}" == "exit" || "${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
|
||||
bash /opt/plexguide/menu/pgbox/remove/removal.sh
|
||||
exit
|
||||
sleep 1.5
|
||||
bash /opt/plexguide/menu/pgbox/remove/removal.sh
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ "$typed" == "" ]]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ WARNING! - The App Name Cannot Be Blank!
|
||||
⚠️ WARNING! - Cannot be left blank. Please type an app
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 3
|
||||
bash /opt/traefik/tld.sh
|
||||
exit
|
||||
sleep 3
|
||||
bash /opt/traefik/tld.sh
|
||||
exit
|
||||
fi
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
💎 PASS: Uninstalling - $typed
|
||||
💎 Now uninstalling - $typed
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 1.5
|
||||
##check for running docker
|
||||
##check for running docker
|
||||
drunning=$(docker ps --format '{{.Names}}' | grep "$typed")
|
||||
if [[ "$drunning" == "$typed" ]]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🍖 NOM NOM - Stopping | Removing > $typed Docker Container
|
||||
🍖 NOM NOM - Stopping container & uninstalling > $typed
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
docker stop $typed 1>/dev/null 2>&1
|
||||
docker rm $typed 1>/dev/null 2>&1
|
||||
rm -rf /opt/appdata/$typed
|
||||
docker stop $typed 1>/dev/null 2>&1
|
||||
docker rm $typed 1>/dev/null 2>&1
|
||||
rm -rf /opt/appdata/$typed
|
||||
fi
|
||||
|
||||
if [[ "$drunning" != "$typed" ]]; then
|
||||
@@ -110,14 +111,14 @@ tee <<-EOF
|
||||
🍖 NOM NOM - Removing /opt/appdata/$typed
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
rm -rf /opt/appdata/$typed
|
||||
rm -rf /opt/appdata/$typed
|
||||
fi
|
||||
|
||||
file="/opt/coreapps/apps/$typed.yml"
|
||||
if [[ -e "$file" ]]; then
|
||||
check=$(cat /opt/coreapps/apps/$typed.yml | grep '##PG-Community')
|
||||
if [[ "$check" == "##PG-Community" ]]; then rm -r /opt/communityapps/apps/$typed.yml; fi
|
||||
rm -rf /var/plexguide/community.app
|
||||
check=$(cat /opt/coreapps/apps/$typed.yml | grep '##PG-Community')
|
||||
if [[ "$check" == "##PG-Community" ]]; then rm -r /opt/communityapps/apps/$typed.yml; fi
|
||||
rm -rf /var/plexguide/community.app
|
||||
fi
|
||||
|
||||
sleep 1.5
|
||||
@@ -125,7 +126,7 @@ sleep 1.5
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ PASS: Uninstalled - $typed - Exiting!
|
||||
✅️ Successfully uninstalled $typed - Now exiting...
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 2
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
################################################################################
|
||||
|
||||
GCEtest(){
|
||||
gce=$(cat /var/plexguide/pg.server.deploy)
|
||||
|
||||
if [[ $gce == "feeder" ]]; then
|
||||
mainstart2
|
||||
gce=$(cat /var/plexguide/pg.server.deploy)
|
||||
|
||||
if [[ $gce == "feeder" ]]; then
|
||||
mainstart2
|
||||
else mainstart1; fi
|
||||
}
|
||||
|
||||
@@ -18,63 +18,63 @@ mainstart1() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Box Apps Interface Selection
|
||||
🛈 Box Apps Interface Selection
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
💬 PTS Box installs a series of Core and Community applications!
|
||||
💬 Pandaura installs a series of Core and Community applications
|
||||
|
||||
[1] PTS : Core
|
||||
[2] PTS : Community
|
||||
--------------------------------
|
||||
[3] Apps : Personal Forks
|
||||
[4] Apps : Removal
|
||||
[5] Apps : Auto Update
|
||||
[1] Pandaura : Core
|
||||
[2] Pandaura : Community
|
||||
---------------------------------
|
||||
[3] Personal Fork : Use your own Github fork
|
||||
[4] Uninstaller : Remove installed apps
|
||||
[5] Apps : Auto Update
|
||||
|
||||
[Z] Exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
# Standby
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
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 ;;
|
||||
esac
|
||||
|
||||
# Standby
|
||||
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 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) GCEtest ;;
|
||||
esac
|
||||
}
|
||||
|
||||
mainstart2() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 GCE APPS optimized Apps
|
||||
🛈 GCE optimized Apps
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[1] PTS GCE optimized Apps : GCE APPS
|
||||
[1] GCE optimized Apps : GCE APPS
|
||||
|
||||
[2] Apps : Removal
|
||||
[2] Uninstaller : Remove installed apps
|
||||
|
||||
[Z] Exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) bash /opt/plexguide/menu/pgbox/gce/gcecore.sh ;;
|
||||
2) bash /opt/plexguide/menu/pgbox/remove/removal.sh ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) GCEtest ;;
|
||||
esac
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) bash /opt/plexguide/menu/pgbox/gce/gcecore.sh ;;
|
||||
2) bash /opt/plexguide/menu/pgbox/remove/removal.sh ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) GCEtest ;;
|
||||
esac
|
||||
}
|
||||
|
||||
GCEtest
|
||||
|
||||
@@ -47,7 +47,7 @@ mainbanner() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 $roleproper
|
||||
🛈 $roleproper
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
$clonerinfo
|
||||
@@ -91,7 +91,7 @@ pinterface() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 $roleproper
|
||||
🛈 $roleproper
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
💬 User: $user | Branch: $branch
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
- name: Clone Role
|
||||
git:
|
||||
repo: 'https://github.com/MHA-Team/{{pname.stdout}}'
|
||||
repo: 'https://github.com/Pandaura/{{pname.stdout}}'
|
||||
dest: '/opt/{{prole.stdout}}'
|
||||
version: '{{pversion.stdout}}'
|
||||
force: yes
|
||||
|
||||
@@ -50,7 +50,7 @@ mainbanner() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 $roleproper
|
||||
🛈 $roleproper
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
$clonerinfo
|
||||
@@ -95,7 +95,7 @@ pinterface() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 $roleproper
|
||||
🛈 $roleproper
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
💬 User: $user | Branch: $branch
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
- name: Clone Role
|
||||
git:
|
||||
repo: 'https://github.com/MHA-Team/{{pname.stdout}}'
|
||||
repo: 'https://github.com/Pandaura/{{pname.stdout}}'
|
||||
dest: '/opt/{{prole.stdout}}'
|
||||
version: '{{pversion.stdout}}'
|
||||
force: yes
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
- name: Clone Role
|
||||
git:
|
||||
repo: 'https://github.com/MHA-Team/{{pname.stdout}}'
|
||||
repo: 'https://github.com/Pandaura/{{pname.stdout}}'
|
||||
dest: '/opt/{{prole.stdout}}'
|
||||
version: '{{pversion.stdout}}'
|
||||
force: yes
|
||||
|
||||
@@ -29,15 +29,6 @@ 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
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/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
|
||||
@@ -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
|
||||
|
||||
@@ -1,125 +1,129 @@
|
||||
#!/bin/bash
|
||||
# FUNCTIONS START ##############################################################
|
||||
|
||||
pgautoscan="autoscan"
|
||||
|
||||
typed="${typed,,}"
|
||||
rmoldinstall() {
|
||||
dcheck=$(systemctl is-active plex_autoscan.service)
|
||||
if [[ "$dcheck" == "active" ]]; then
|
||||
service plex_autoscan stop
|
||||
rm -rf /opt/plex_autoscan
|
||||
rm -rf /etc/systemd/system/plex_autoscan.service
|
||||
rm -rf /var/plexguide/pgscan
|
||||
fresh
|
||||
else fresh; fi
|
||||
dcheck=$(systemctl is-active plex_autoscan.service)
|
||||
if [[ "$dcheck" == "active" ]]; then
|
||||
service plex_autoscan stop
|
||||
rm -rf /opt/plex_autoscan
|
||||
rm -rf /etc/systemd/system/plex_autoscan.service
|
||||
rm -rf /var/plexguide/pgscan
|
||||
fresh
|
||||
else fresh; fi
|
||||
}
|
||||
fresh() {
|
||||
mkdir -p /var/plexguide/pgscan
|
||||
echo "en" >/var/plexguide/pgscan/fixmatch.lang
|
||||
echo "false" >/var/plexguide/pgscan/fixmatch.status
|
||||
echo "NOT-SET" >/var/plexguide/pgscan/plex.docker
|
||||
mkdir -p /var/plexguide/pgscan
|
||||
echo "en" >/var/plexguide/pgscan/fixmatch.lang
|
||||
echo "false" >/var/plexguide/pgscan/fixmatch.status
|
||||
echo "NOT-SET" >/var/plexguide/pgscan/plex.docker
|
||||
}
|
||||
variable() {
|
||||
file="$1"
|
||||
if [[ ! -e "$file" ]]; then echo "$2" >$1; fi
|
||||
file="$1"
|
||||
if [[ ! -e "$file" ]]; then echo "$2" >$1; fi
|
||||
}
|
||||
deploycheck() {
|
||||
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
|
||||
if [[ "$dcheck" == "plexautoscan" ]]; then
|
||||
dstatus="✅ DOCKER DEPLOYED"
|
||||
else dstatus="⚠️ DOCKER NOT DEPLOYED"; fi
|
||||
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
|
||||
if [[ "$dcheck" == "plexautoscan" ]]; then
|
||||
dstatus="✅ DOCKER DEPLOYED"
|
||||
else dstatus="⚠️ DOCKER NOT DEPLOYED"; fi
|
||||
}
|
||||
tokenstatus() {
|
||||
ptokendep=$(cat /var/plexguide/pgscan/plex.token)
|
||||
if [[ "$ptokendep" != "" ]]; then
|
||||
ptokendep=$(cat /var/plexguide/pgscan/plex.token)
|
||||
if [[ "$ptokendep" != "" ]]; then
|
||||
if [[ ! -f "/opt/appdata/plexautoscan/config/config.json" ]]; then
|
||||
pstatus="❌ TOKEN DEPLOYED || PAS CONFIG MISSING";
|
||||
pstatus="❌ TOKEN DEPLOYED || PAS CONFIG MISSING";
|
||||
else
|
||||
PGSELFTEST=$(curl -LI "http://$(hostname -I | awk '{print $1}'):32400/system?X-Plex-Token=$(cat /opt/appdata/plexautoscan/config/config.json | jq .PLEX_TOKEN | sed 's/"//g')" -o /dev/null -w '%{http_code}\n' -s)
|
||||
if [[ $PGSELFTEST -ge 200 && $PGSELFTEST -le 299 ]]; then pstatus="✅ TOKEN DEPLOYED"
|
||||
else pstatus="❌ DOCKER DEPLOYED || PAS TOKEN FAILED"; fi
|
||||
PGSELFTEST=$(curl -LI "http://$(hostname -I | awk '{print $1}'):32400/system?X-Plex-Token=$(cat /opt/appdata/plexautoscan/config/config.json | jq .PLEX_TOKEN | sed 's/"//g')" -o /dev/null -w '%{http_code}\n' -s)
|
||||
if [[ $PGSELFTEST -ge 200 && $PGSELFTEST -le 299 ]]; then pstatus="✅ TOKEN DEPLOYED"
|
||||
else pstatus="❌ DOCKER DEPLOYED || PAS TOKEN FAILED"; fi
|
||||
fi
|
||||
else pstatus="⚠️ NOT DEPLOYED"; fi
|
||||
else pstatus="⚠️ NOT DEPLOYED"; fi
|
||||
}
|
||||
plexcheck() {
|
||||
pcheck=$(docker ps --format '{{.Names}}' | grep "plex")
|
||||
if [[ "$pcheck" == "" ]]; then
|
||||
printf '
|
||||
pcheck=$(docker ps --format '{{.Names}}' | grep "plex")
|
||||
if [[ "$pcheck" == "" ]]; then
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ WARNING! - Plex is Not Installed or Running! Exiting!
|
||||
⚠️ WARNING! - Plex is Not Installed or Running! Exiting!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
'
|
||||
dontwork
|
||||
fi
|
||||
'
|
||||
dontwork
|
||||
fi
|
||||
}
|
||||
token() {
|
||||
touch /var/plexguide/pgscan/plex.token
|
||||
ptoken=$(cat /var/plexguide/pgscan/plex.token)
|
||||
if [[ ! -f "$ptoken" ]]; then
|
||||
tokencreate
|
||||
sleep 2
|
||||
X_PLEX_TOKEN=$(sudo cat "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1)
|
||||
touch /var/plexguide/pgscan/plex.token
|
||||
ptoken=$(cat /var/plexguide/pgscan/plex.token)
|
||||
if [[ "$ptoken" != "$X_PLEX_TOKEN" ]]; then
|
||||
printf '
|
||||
if [[ ! -f "$ptoken" ]]; then
|
||||
tokencreate
|
||||
sleep 2
|
||||
X_PLEX_TOKEN=$(sudo cat "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1)
|
||||
ptoken=$(cat /var/plexguide/pgscan/plex.token)
|
||||
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
|
||||
'
|
||||
dontwork
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
tokencreate() {
|
||||
printf '
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 START Plex_AutoScan Token Create
|
||||
🛈 START Plex_AutoScan Token Create
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
'
|
||||
|
||||
templatebackup=/opt/plexguide/menu/pgscan/templates/config.backup
|
||||
template=/opt/plexguide/menu/pgscan/templates/config.json.j2
|
||||
X_PLEX_TOKEN=$(sudo cat "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1)
|
||||
|
||||
cp -r $template $templatebackup
|
||||
echo $X_PLEX_TOKEN >/var/plexguide/pgscan/plex.token
|
||||
|
||||
printf '
|
||||
'
|
||||
|
||||
templatebackup=/opt/plexguide/menu/pgscan/templates/config.backup
|
||||
template=/opt/plexguide/menu/pgscan/templates/config.json.j2
|
||||
X_PLEX_TOKEN=$(sudo cat "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" | sed -e 's;^.* PlexOnlineToken=";;' | sed -e 's;".*$;;' | tail -1)
|
||||
|
||||
cp -r $template $templatebackup
|
||||
echo $X_PLEX_TOKEN >/var/plexguide/pgscan/plex.token
|
||||
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅ FINISHED Plex_AutoScan Token 🚀 START SERVERPASS Create
|
||||
✅ FINISHED Plex_AutoScan Token 🛈 START SERVERPASS Create
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
'
|
||||
|
||||
RAN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
echo $RAN >/var/plexguide/pgscan/pgscan.serverpass
|
||||
|
||||
printf '
|
||||
'
|
||||
|
||||
RAN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
echo $RAN >/var/plexguide/pgscan/pgscan.serverpass
|
||||
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅ FINISHED Plex_AutoScan Token || SERVERPASS
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
'
|
||||
|
||||
timerremove
|
||||
question1
|
||||
'
|
||||
|
||||
timerremove
|
||||
question1
|
||||
}
|
||||
badinput() {
|
||||
echo
|
||||
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && question1
|
||||
echo
|
||||
read -p '⚠️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && question1
|
||||
}
|
||||
dontwork() {
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && exit 0
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && exit 0
|
||||
}
|
||||
works() {
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && question1
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && question1
|
||||
}
|
||||
credits() {
|
||||
clear
|
||||
printf '
|
||||
clear
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Plex_AutoScan Credits
|
||||
🛈 Plex_AutoScan Credits
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
#########################################################################
|
||||
@@ -135,94 +139,94 @@ printf '
|
||||
#########################################################################
|
||||
# GNU General Public License v3.0 #
|
||||
#########################################################################
|
||||
'
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && question1
|
||||
'
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && question1
|
||||
}
|
||||
doneenter() {
|
||||
echo
|
||||
read -p 'All done | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && question1
|
||||
echo
|
||||
read -p 'All done | PRESS [ENTER] ' typed </dev/tty
|
||||
clear && question1
|
||||
}
|
||||
|
||||
####REMOVEPART start
|
||||
# KEY VARIABLE RECALL & EXECUTION
|
||||
timerremove() {
|
||||
seconds=10; date1=$((`date +%s` + $seconds));
|
||||
while [ "$date1" -ge `date +%s` ]; do
|
||||
echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r";
|
||||
done
|
||||
seconds=10; date1=$((`date +%s` + $seconds));
|
||||
while [ "$date1" -ge `date +%s` ]; do
|
||||
echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r";
|
||||
done
|
||||
}
|
||||
remove() {
|
||||
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
|
||||
if [[ "$dcheck" == "plexautoscan" ]]; then
|
||||
removepas
|
||||
else
|
||||
notinstalled
|
||||
fi
|
||||
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
|
||||
if [[ "$dcheck" == "plexautoscan" ]]; then
|
||||
removepas
|
||||
else
|
||||
notinstalled
|
||||
fi
|
||||
}
|
||||
|
||||
removepas() {
|
||||
printf '
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 STARTING Remove Plex AutoScan Docker || l3uddz/plex_autoscan
|
||||
🛈 STARTING Remove Plex AutoScan Docker || l3uddz/plex_autoscan
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
'
|
||||
|
||||
docker stop plexautoscan
|
||||
docker rm plexautoscan
|
||||
rm -rf /opt/appdata/plexautoscan
|
||||
rm -rf /var/plexguide/pgscan
|
||||
fresh
|
||||
echo "en" >/var/plexguide/pgscan/fixmatch.lang
|
||||
echo "false" >/var/plexguide/pgscan/fixmatch.status
|
||||
echo "NOT-SET" >/var/plexguide/pgscan/plex.docker
|
||||
|
||||
printf '
|
||||
'
|
||||
|
||||
docker stop plexautoscan
|
||||
docker rm plexautoscan
|
||||
rm -rf /opt/appdata/plexautoscan
|
||||
rm -rf /var/plexguide/pgscan
|
||||
fresh
|
||||
echo "en" >/var/plexguide/pgscan/fixmatch.lang
|
||||
echo "false" >/var/plexguide/pgscan/fixmatch.status
|
||||
echo "NOT-SET" >/var/plexguide/pgscan/plex.docker
|
||||
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 FINISHED REMOVE Plex AutoScan Docker
|
||||
🛈 FINISHED REMOVE Plex AutoScan Docker
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
'
|
||||
timerremove
|
||||
question1
|
||||
'
|
||||
timerremove
|
||||
question1
|
||||
}
|
||||
notinstalled() {
|
||||
|
||||
printf '
|
||||
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ WARNING! - PAS is Not Installed or Running! Exiting!
|
||||
⚠️ WARNING! - PAS is Not Installed or Running! Exiting!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
'
|
||||
timerremove
|
||||
question1
|
||||
'
|
||||
timerremove
|
||||
question1
|
||||
}
|
||||
##### REMOVE END
|
||||
logger() {
|
||||
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
|
||||
if [[ "$dcheck" == "plexautoscan" ]]; then
|
||||
printf '
|
||||
dcheck=$(docker ps --format '{{.Names}}' | grep "$pgautoscan")
|
||||
if [[ "$dcheck" == "$pgautoscan" ]]; then
|
||||
printf '
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 ACTIVE LOGS Plex AutoScan Docker || l3uddz/plex_autoscan
|
||||
🛈 ACTIVE LOGS Plex AutoScan Docker || l3uddz/plex_autoscan
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
'
|
||||
tail -n 50 /opt/appdata/plexautoscan/config/plex_autoscan.log
|
||||
doneenter
|
||||
else
|
||||
notinstalled
|
||||
fi
|
||||
'
|
||||
tail -n 50 /opt/appdata/$pgautoscan/config/plex_autoscan.log
|
||||
doneenter
|
||||
else
|
||||
notinstalled
|
||||
fi
|
||||
}
|
||||
|
||||
fxmatch() {
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Plex_AutoScan FixMatching
|
||||
🛈 Plex_AutoScan FixMatching
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
NOTE :
|
||||
Plex Autoscan will compare the TVDBID/TMDBID/IMDBID sent
|
||||
by Sonarr/Radarr with what Plex has matched with, and if
|
||||
this match is incorrect, it will autocorrect the match on the
|
||||
item (movie file or TV episode). If the incorrect match is
|
||||
a duplicate entry in Plex, it will auto split the original
|
||||
NOTE :
|
||||
Plex Autoscan will compare the TVDBID/TMDBID/IMDBID sent
|
||||
by Sonarr/Radarr with what Plex has matched with, and if
|
||||
this match is incorrect, it will autocorrect the match on the
|
||||
item (movie file or TV episode). If the incorrect match is
|
||||
a duplicate entry in Plex, it will auto split the original
|
||||
entry before correcting the match on the new item.
|
||||
|
||||
|
||||
@@ -234,28 +238,28 @@ entry before correcting the match on the new item.
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) lang && clear && fxmatch ;;
|
||||
2) runs && clear && fxmatch ;;
|
||||
z) question1 ;;
|
||||
Z) question1 ;;
|
||||
*) fxmatch ;;
|
||||
esac
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) lang && clear && fxmatch ;;
|
||||
2) runs && clear && fxmatch ;;
|
||||
z) question1 ;;
|
||||
Z) question1 ;;
|
||||
*) fxmatch ;;
|
||||
esac
|
||||
}
|
||||
lang() {
|
||||
|
||||
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Plex_AutoScan FixMatching Lang
|
||||
🛈 Plex_AutoScan FixMatching Lang
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
NOTE : Sample :
|
||||
|
||||
this will work :
|
||||
this will work :
|
||||
en
|
||||
de
|
||||
de
|
||||
jp
|
||||
ch
|
||||
|
||||
@@ -266,12 +270,12 @@ Default is "en"
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Lang | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
fxmatch
|
||||
else
|
||||
|
||||
read -p '↘️ Type Lang | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
fxmatch
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -282,49 +286,49 @@ Language Set Is: $typed
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
echo $typed >/var/plexguide/pgscan/fixmatch.lang
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
fxmatch
|
||||
fi
|
||||
|
||||
echo $typed >/var/plexguide/pgscan/fixmatch.lang
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
fxmatch
|
||||
fi
|
||||
}
|
||||
runs() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Plex_AutoScan Fix Missmatch
|
||||
🛈 Plex_AutoScan Fix Missmatch
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[1] True
|
||||
[1] True
|
||||
[2] False
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[Z] - Exit
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) echo "true" >/var/plexguide/pgscan/fixmatch.status && fxmatch ;;
|
||||
2) echo "false" >/var/plexguide/pgscan/fixmatch.status && fxmatch ;;
|
||||
z) fxmatch ;;
|
||||
Z) fxmatch ;;
|
||||
*) fxmatch ;;
|
||||
esac
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) echo "true" >/var/plexguide/pgscan/fixmatch.status && fxmatch ;;
|
||||
2) echo "false" >/var/plexguide/pgscan/fixmatch.status && fxmatch ;;
|
||||
z) fxmatch ;;
|
||||
Z) fxmatch ;;
|
||||
*) fxmatch ;;
|
||||
esac
|
||||
}
|
||||
pversion() {
|
||||
plexcontainerversion=$(docker ps --format '{{.Image}}' | grep "plex:")
|
||||
if [[ "$plexcontainerversion" == "linuxserver/plex:latest" ]]; then
|
||||
echo -e "abc" >/var/plexguide/pgscan/plex.dockeruserset
|
||||
else echo "plex" >/var/plexguide/pgscan/plex.dockeruserset
|
||||
fi
|
||||
pasuserdocker=$(cat /var/plexguide/pgscan/plex.dockeruserset)
|
||||
|
||||
plexcontainerversion=$(docker ps --format '{{.Image}}' | grep "plex:")
|
||||
if [[ "$plexcontainerversion" == "linuxserver/plex:latest" ]]; then
|
||||
echo -e "abc" >/var/plexguide/pgscan/plex.dockeruserset
|
||||
else echo "plex" >/var/plexguide/pgscan/plex.dockeruserset
|
||||
fi
|
||||
pasuserdocker=$(cat /var/plexguide/pgscan/plex.dockeruserset)
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Plex Docker
|
||||
🛈 Plex Docker
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
Linuxserver Docker used "abc"
|
||||
Plex Docker used "plex"
|
||||
@@ -336,41 +340,41 @@ Set Plex Docker user: [ $pasuserdocker ]
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
cp -r /var/plexguide/pgscan/plex.dockeruserset /var/plexguide/pgscan/plex.docker 1>/dev/null 2>&1
|
||||
doneenter
|
||||
|
||||
|
||||
cp -r /var/plexguide/pgscan/plex.dockeruserset /var/plexguide/pgscan/plex.docker 1>/dev/null 2>&1
|
||||
doneenter
|
||||
|
||||
}
|
||||
|
||||
showuppage() {
|
||||
dpas=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
|
||||
dtra=$(docker ps --format '{{.Names}}' | grep "traefik")
|
||||
if [[ "$dpas" == "plexautoscan" && "$dtra" == "traefik" ]]; then
|
||||
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
|
||||
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
|
||||
}
|
||||
|
||||
question1() {
|
||||
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
|
||||
if [[ "$dcheck" == "plexautoscan" ]]; then
|
||||
deplyoed
|
||||
else undeployed; fi
|
||||
dcheck=$(docker ps --format '{{.Names}}' | grep "plexautoscan")
|
||||
if [[ "$dcheck" == "plexautoscan" ]]; then
|
||||
deplyoed
|
||||
else undeployed; fi
|
||||
}
|
||||
pasdeploy() {
|
||||
ansible-playbook /opt/plexguide/menu/pgscan/yml/plexautoscan.yml
|
||||
clear
|
||||
ansible-playbook /opt/plexguide/menu/pgscan/yml/plexautoscan.yml
|
||||
clear
|
||||
}
|
||||
undeployed() {
|
||||
langfa=$(cat /var/plexguide/pgscan/fixmatch.status)
|
||||
lang=$(cat /var/plexguide/pgscan/fixmatch.lang)
|
||||
dplexset=$(cat /var/plexguide/pgscan/plex.docker)
|
||||
tokenstatus
|
||||
deploycheck
|
||||
|
||||
langfa=$(cat /var/plexguide/pgscan/fixmatch.status)
|
||||
lang=$(cat /var/plexguide/pgscan/fixmatch.lang)
|
||||
dplexset=$(cat /var/plexguide/pgscan/plex.docker)
|
||||
tokenstatus
|
||||
deploycheck
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Plex_AutoScan Interface || l3uddz/plex_autoscan
|
||||
🛈 Plex_AutoScan Interface || l3uddz/plex_autoscan
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[1] Deploy Plex Token [ $pstatus ]
|
||||
@@ -386,35 +390,35 @@ tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) tokencreate && clear && question1 ;;
|
||||
2) fxmatch && clear && question1 ;;
|
||||
3) pversion && clear && question1 ;;
|
||||
A) pasdeploy && question1 ;;
|
||||
a) pasdeploy && question1 ;;
|
||||
C) credits && clear && question1 ;;
|
||||
c) credits && clear && question1 ;;
|
||||
z) exit 0 ;;
|
||||
Z) exit 0 ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) tokencreate && clear && question1 ;;
|
||||
2) fxmatch && clear && question1 ;;
|
||||
3) pversion && clear && question1 ;;
|
||||
A) pasdeploy && question1 ;;
|
||||
a) pasdeploy && question1 ;;
|
||||
C) credits && clear && question1 ;;
|
||||
c) credits && clear && question1 ;;
|
||||
z) exit 0 ;;
|
||||
Z) exit 0 ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
deplyoed() {
|
||||
langfa=$(cat /var/plexguide/pgscan/fixmatch.status)
|
||||
lang=$(cat /var/plexguide/pgscan/fixmatch.lang)
|
||||
dplexset=$(cat /var/plexguide/pgscan/plex.docker)
|
||||
showuppage
|
||||
tokenstatus
|
||||
deploycheck
|
||||
|
||||
langfa=$(cat /var/plexguide/pgscan/fixmatch.status)
|
||||
lang=$(cat /var/plexguide/pgscan/fixmatch.lang)
|
||||
dplexset=$(cat /var/plexguide/pgscan/plex.docker)
|
||||
showuppage
|
||||
tokenstatus
|
||||
deploycheck
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Plex_AutoScan Interface || l3uddz/plex_autoscan
|
||||
🛈 Plex_AutoScan Interface || l3uddz/plex_autoscan
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[1] Deploy Plex Token [ $pstatus ]
|
||||
@@ -440,25 +444,25 @@ PAS Webhook ARRs : [ $showpaspage ]
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) tokencreate && clear && question1 ;;
|
||||
2) fxmatch && clear && question1 ;;
|
||||
3) pversion && clear && question1 ;;
|
||||
A) pasdeploy && question1 ;;
|
||||
a) pasdeploy && question1 ;;
|
||||
S) logger ;;
|
||||
s) logger ;;
|
||||
r) removepas ;;
|
||||
R) removepas ;;
|
||||
C) credits && clear && question1 ;;
|
||||
c) credits && clear && question1 ;;
|
||||
z) exit 0 ;;
|
||||
Z) exit 0 ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) tokencreate && clear && question1 ;;
|
||||
2) fxmatch && clear && question1 ;;
|
||||
3) pversion && clear && question1 ;;
|
||||
A) pasdeploy && question1 ;;
|
||||
a) pasdeploy && question1 ;;
|
||||
S) logger ;;
|
||||
s) logger ;;
|
||||
r) removepas ;;
|
||||
R) removepas ;;
|
||||
C) credits && clear && question1 ;;
|
||||
c) credits && clear && question1 ;;
|
||||
z) exit 0 ;;
|
||||
Z) exit 0 ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
}
|
||||
# FUNCTIONS END ##############################################################
|
||||
rmoldinstall
|
||||
|
||||
48
menu/pgscan/yml/config.yml
Normal file
48
menu/pgscan/yml/config.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
# 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}}
|
||||
@@ -9,9 +9,9 @@
|
||||
- name: 'Set Known Facts'
|
||||
set_fact:
|
||||
pgrole: 'plexautoscan'
|
||||
intport: '3468'
|
||||
extport: '3468'
|
||||
image: 'sabrsorensen/alpine-plex_autoscan:1df2c05'
|
||||
intport: '3030'
|
||||
extport: '3030'
|
||||
image: 'cloudb0x/autoscan:master'
|
||||
|
||||
# CORE (MANDATORY) ############################################################
|
||||
- name: 'Including cron job'
|
||||
@@ -21,7 +21,7 @@
|
||||
include_tasks: './pastask.yml'
|
||||
|
||||
# LABELS ######################################################################
|
||||
- name: 'Adding Traefik'
|
||||
- name: 'Adding Traefik for {{pgrole}}'
|
||||
set_fact:
|
||||
pg_labels:
|
||||
traefik.enable: 'true'
|
||||
@@ -38,23 +38,52 @@
|
||||
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}}/config:/config'
|
||||
- '/opt/appdata/{{pgrole}}/yml:/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'
|
||||
DOCKERGID: '999'
|
||||
AUTOSCAN_VERBOSITY: '1'
|
||||
|
||||
# MAIN DEPLOYMENT #############################################################
|
||||
- name: 'Deploying {{pgrole}}'
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
path: /opt/pgstage
|
||||
register: stat_result
|
||||
- debug:
|
||||
msg: "PTS Check for missing pull"
|
||||
msg: "Pandaura is checking folder exists"
|
||||
|
||||
- name: 'Cloning PTS Install files'
|
||||
- name: 'Cloning Pandaura Install files'
|
||||
git:
|
||||
repo: 'https://github.com/MHA-Team/Install'
|
||||
repo: 'https://github.com/Pandaura/Install'
|
||||
dest: '/opt/pgstage'
|
||||
clone: yes
|
||||
version: 'master'
|
||||
@@ -23,7 +23,7 @@
|
||||
path: /opt/pgstage
|
||||
register: p
|
||||
- debug:
|
||||
msg: "Path exists and PTS folder are pulled"
|
||||
msg: "Path exists"
|
||||
when: p.stat.isdir is defined and p.stat.isdir
|
||||
|
||||
- name: Remove .githube folder and .git files
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
pgrole: 'pgui'
|
||||
intport: '80'
|
||||
extport: '8555'
|
||||
image: 'mrdoob/dngele:latest'
|
||||
image: 'hawkinzzz/dngele'
|
||||
|
||||
# CORE (MANDATORY) ############################################################
|
||||
- name: 'Including core job'
|
||||
|
||||
@@ -134,7 +134,7 @@ padding: 10px;
|
||||
</head>
|
||||
<body text="#FFFFFF">
|
||||
<ul class="navigation">
|
||||
<li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
|
||||
</ul>
|
||||
<div class="image">
|
||||
|
||||
@@ -142,7 +142,7 @@ a:visited {
|
||||
</head>
|
||||
<body text="#FFFFFF">
|
||||
<ul class="navigation">
|
||||
<li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
|
||||
</ul>
|
||||
<div class="image">
|
||||
|
||||
@@ -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 deployed with ports open! Server at risk for explotation!" >/opt/appdata/plexguide/emergency/message.a
|
||||
echo "Warning: Traefik has been deployed with ports open! Server is at risk for exploitation!" >/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 enabled! 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 deployed! 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
|
||||
@@ -132,7 +132,7 @@ while true; do
|
||||
fi
|
||||
##### Warning for Traefik Rate Limit Exceeded
|
||||
if [[ $(cat /opt/appdata/plexguide/traefik.check) == "" && $(docker logs traefik | grep "rateLimited") != "" ]]; then
|
||||
echo "$domain's rated limited exceed | Traefik (LetsEncrypt)! Takes upto one week to clear up (or use a new domain)" >/opt/appdata/plexguide/emergency/message.d
|
||||
echo "$domain's rated limited exceed | Traefik (LetsEncrypt)! Takes up to one week to clear up (or use a new domain)" >/opt/appdata/plexguide/emergency/message.d
|
||||
else
|
||||
if [[ -e "/opt/appdata/plexguide/emergency/message.d" ]]; then
|
||||
rm -rf /opt/appdata/plexguide/emergency/message.d
|
||||
|
||||
@@ -134,7 +134,7 @@ padding: 10px;
|
||||
</head>
|
||||
<body text="#FFFFFF">
|
||||
<ul class="navigation">
|
||||
<li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
|
||||
</ul>
|
||||
<div class="image">
|
||||
|
||||
@@ -142,7 +142,7 @@ a:visited {
|
||||
</head>
|
||||
<body text="#FFFFFF">
|
||||
<ul class="navigation">
|
||||
<li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
|
||||
</ul>
|
||||
<div class="image">
|
||||
|
||||
@@ -134,7 +134,7 @@ padding: 10px;
|
||||
</head>
|
||||
<body text="#FFFFFF">
|
||||
<ul class="navigation">
|
||||
<li><a class="active" href="https://github.com/MHA-Team/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a class="active" href="https://github.com/Pandaura/PTS-Team/wiki">PTS-Wiki</a></li>
|
||||
<li><a href="https://discord.gg/cKsMwMZ">Discord</a></li>
|
||||
</ul>
|
||||
<div class="image">
|
||||
|
||||
@@ -4,146 +4,153 @@
|
||||
# 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})
|
||||
if [[ "$runcheck5" != "" ]]; then running=1; else running=0; fi
|
||||
initial2
|
||||
runcheck5=$(docker ps | grep ${program_var})
|
||||
if [[ "$runcheck5" != "" ]]; then running=1; else running=0; fi
|
||||
}
|
||||
|
||||
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/app.list 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgvault.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgvault.buildup
|
||||
touch /var/plexguide/pgvault.output
|
||||
touch /var/plexguide/rclone.size
|
||||
space=$(cat /var/plexguide/data.location)
|
||||
# To Get Used Space
|
||||
used=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $3}')
|
||||
# To Get All Space
|
||||
capacity=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $2}')
|
||||
# Percentage
|
||||
percentage=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $5}')
|
||||
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/app.list 1>/dev/null 2>&1
|
||||
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
|
||||
touch /var/plexguide/pgvault.output
|
||||
touch /var/plexguide/program.temp
|
||||
touch /var/plexguide/app.list
|
||||
touch /var/plexguide/pgvault.buildup
|
||||
touch /var/plexguide/pgvault.output
|
||||
touch /var/plexguide/rclone.size
|
||||
space=$(cat /var/plexguide/data.location)
|
||||
# To Get Used Space
|
||||
used=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $3}')
|
||||
# To Get All Space
|
||||
capacity=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $2}')
|
||||
# Percentage
|
||||
percentage=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $5}')
|
||||
}
|
||||
|
||||
initial2() {
|
||||
path=$(cat /var/plexguide/server.hd.path)
|
||||
tarlocation=$(cat /var/plexguide/data.location)
|
||||
program_size=$(cat /var/plexguide/rclone.size)
|
||||
program_var=$(cat /tmp/program_var)
|
||||
server_id=$(cat /var/plexguide/server.id)
|
||||
path=$(cat /var/plexguide/server.hd.path)
|
||||
tarlocation=$(cat /var/plexguide/data.location)
|
||||
program_size=$(cat /var/plexguide/rclone.size)
|
||||
program_var=$(cat /tmp/program_var)
|
||||
server_id=$(cat /var/plexguide/server.id)
|
||||
}
|
||||
|
||||
final() {
|
||||
echo
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
read -p '✅ Process Complete! | PRESS [ENTER] ' typed </dev/tty
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
bash /opt/pgvault/pgvault.sh
|
||||
exit
|
||||
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
|
||||
exit
|
||||
}
|
||||
|
||||
queued() {
|
||||
echo
|
||||
read -p "⛔️ ERROR - $typed Already Queued! | Press [ENTER] " typed </dev/tty
|
||||
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
|
||||
echo
|
||||
read -p '⛔️ ERROR - Type an Exact Server Name | Press [ENTER] ' typed </dev/tty
|
||||
clear_lines 2
|
||||
}
|
||||
|
||||
#not used yet
|
||||
rclonelist() {
|
||||
ls -l /mnt/gdrive/plexguide/backup | grep "^d" | awk '{print $9}' >pgvault.serverlist
|
||||
ls -l /mnt/gdrive/plexguide/backup | grep "^d" | awk '{print $9}' >pgvault.serverlist
|
||||
}
|
||||
|
||||
pgboxrecall() {
|
||||
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/pgvault/exempt.list
|
||||
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall
|
||||
basename "$p" .yml >>/var/plexguide/pgvault.apprecall
|
||||
done </var/plexguide/pgvault.apprecall
|
||||
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
|
||||
|
||||
while read p; do
|
||||
sed -i "/^$p\b/Id" /var/plexguide/pgvault.apprecall
|
||||
basename "$p" .yml >>/var/plexguide/pgvault.apprecall
|
||||
done </var/plexguide/pgvault.apprecall
|
||||
}
|
||||
|
||||
mathprime() {
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
num=0
|
||||
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
|
||||
num=$((num + 1))
|
||||
if [ "$num" == 7 ]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/pgvault.apprecall
|
||||
### List Out Apps In Readable Order (One's Not Installed)
|
||||
num=0
|
||||
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
|
||||
num=$((num + 1))
|
||||
if [ "$num" == 7 ]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </var/plexguide/pgvault.apprecall
|
||||
}
|
||||
|
||||
################################################ FOR BACKUP - START
|
||||
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/pgvault/exempt.list
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
mathprime
|
||||
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
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp && touch /var/plexguide/program.temp
|
||||
mathprime
|
||||
}
|
||||
|
||||
buildup() {
|
||||
echo "$typed" >>/var/plexguide/pgvault.buildup
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/pgvault.apprecall
|
||||
|
||||
num=0
|
||||
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgvault.output
|
||||
echo -n " " >>/var/plexguide/pgvault.output
|
||||
if [ "$num" == 7 ]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgvault.output
|
||||
fi
|
||||
done </var/plexguide/pgvault.buildup
|
||||
|
||||
mathprime
|
||||
vaultbackup
|
||||
echo "$typed" >>/var/plexguide/pgvault.buildup
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/pgvault.apprecall
|
||||
|
||||
num=0
|
||||
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgvault.output
|
||||
echo -n " " >>/var/plexguide/pgvault.output
|
||||
if [ "$num" == 7 ]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgvault.output
|
||||
fi
|
||||
done </var/plexguide/pgvault.buildup
|
||||
|
||||
mathprime
|
||||
vaultbackup
|
||||
}
|
||||
################################################ FOR BACKUP - END
|
||||
serverprime() {
|
||||
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
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [ "$num" == 7 ]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </tmp/server.list
|
||||
|
||||
servers=$(cat /var/plexguide/program.temp)
|
||||
server_id=$(cat /var/plexguide/server.id)
|
||||
|
||||
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
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/program.temp
|
||||
echo -n " " >>/var/plexguide/program.temp
|
||||
num=$((num + 1))
|
||||
if [ "$num" == 7 ]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/program.temp
|
||||
fi
|
||||
done </tmp/server.list
|
||||
|
||||
servers=$(cat /var/plexguide/program.temp)
|
||||
server_id=$(cat /var/plexguide/server.id)
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Vault ~ Server Recall
|
||||
🚀 Vault ~ Server Recall
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
📂 Current [${server_id}] & Prior Servers Detected:
|
||||
@@ -153,53 +160,53 @@ $servers
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[Z] Exit
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
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
|
||||
|
||||
current2=$(cat /tmp/server.list | grep "\<$server\>")
|
||||
if [ "$current2" == "" ]; then
|
||||
badserver
|
||||
serverprime
|
||||
fi
|
||||
|
||||
tempserver=$server
|
||||
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
|
||||
touch /var/plexguide/pgvault.apprecall
|
||||
|
||||
while read p; do
|
||||
basename "$p" .tar >>/var/plexguide/pgvault.apprecall
|
||||
done </var/plexguide/pgvault.restoreapps
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
touch /var/plexguide/program.temp
|
||||
mathprime
|
||||
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
|
||||
|
||||
current2=$(cat /tmp/server.list | grep "\<$server\>")
|
||||
if [ "$current2" == "" ]; then
|
||||
badserver
|
||||
serverprime
|
||||
fi
|
||||
|
||||
tempserver=$server
|
||||
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
|
||||
touch /var/plexguide/pgvault.apprecall
|
||||
|
||||
while read p; do
|
||||
basename "$p" .tar >>/var/plexguide/pgvault.apprecall
|
||||
done </var/plexguide/pgvault.restoreapps
|
||||
|
||||
### Blank Out Temp List
|
||||
rm -rf /var/plexguide/program.temp 1>/dev/null 2>&1
|
||||
touch /var/plexguide/program.temp
|
||||
mathprime
|
||||
}
|
||||
|
||||
buildup2() {
|
||||
echo "$typed" >>/var/plexguide/pgvault.buildup
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/pgvault.apprecall
|
||||
|
||||
num=0
|
||||
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgvault.output
|
||||
echo -n " " >>/var/plexguide/pgvault.output
|
||||
if [ "$num" == 7 ]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgvault.output
|
||||
fi
|
||||
done </var/plexguide/pgvault.buildup
|
||||
|
||||
mathprime
|
||||
vaultrestore
|
||||
echo "$typed" >>/var/plexguide/pgvault.buildup
|
||||
sed -i "/^$typed\b/Id" /var/plexguide/pgvault.apprecall
|
||||
|
||||
num=0
|
||||
rm -rf /var/plexguide/pgvault.output 1>/dev/null 2>&1
|
||||
while read p; do
|
||||
echo -n $p >>/var/plexguide/pgvault.output
|
||||
echo -n " " >>/var/plexguide/pgvault.output
|
||||
if [ "$num" == 7 ]; then
|
||||
num=0
|
||||
echo " " >>/var/plexguide/pgvault.output
|
||||
fi
|
||||
done </var/plexguide/pgvault.buildup
|
||||
|
||||
mathprime
|
||||
vaultrestore
|
||||
}
|
||||
################################################ FOR RESTORE - START
|
||||
|
||||
@@ -208,127 +215,142 @@ buildup2() {
|
||||
######################################################## START - PG Vault Backup
|
||||
|
||||
backup_all_start() {
|
||||
|
||||
while read p; do
|
||||
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
|
||||
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
|
||||
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() {
|
||||
while read p; do
|
||||
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
|
||||
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
|
||||
sleep 2.5
|
||||
|
||||
# Store Used Program
|
||||
echo $p >/tmp/program_var
|
||||
# Execute Main Program
|
||||
backup_process
|
||||
|
||||
sleep 2
|
||||
done </var/plexguide/pgvault.buildup
|
||||
final
|
||||
}
|
||||
|
||||
backup_process() {
|
||||
initial2
|
||||
##### Stop Docker Container if Running
|
||||
runningcheck
|
||||
if [[ "$running" == "1" ]]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
↘️ Stopping Docker Container - $program_var
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
sleep 1
|
||||
docker stop $program_var 1>/dev/null 2>&1
|
||||
fi
|
||||
|
||||
###### Start the Backup Process - Backup Locally First
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
↘️ Zipping Data Locally - $program_var
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
path=$(cat /var/plexguide/server.hd.path)
|
||||
tarlocation=$(cat /var/plexguide/data.location)
|
||||
server_id=$(cat /var/plexguide/server.id)
|
||||
|
||||
tar \
|
||||
initial2
|
||||
##### Stop Docker Container if Running
|
||||
runningcheck
|
||||
if [[ "$running" == "1" ]]; then
|
||||
echo "↘️ Stopping Docker Container - $program_var"
|
||||
|
||||
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"
|
||||
|
||||
path=$(cat /var/plexguide/server.hd.path)
|
||||
tarlocation=$(cat /var/plexguide/data.location)
|
||||
server_id=$(cat /var/plexguide/server.id)
|
||||
|
||||
tar \
|
||||
--warning=no-file-changed --ignore-failed-read --absolute-names --warning=no-file-removed \
|
||||
--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
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
↘️ Restarting Docker Application - $program_var
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
sleep 2
|
||||
docker restart $program_var 1>/dev/null 2>&1
|
||||
fi
|
||||
|
||||
###### Backing Up Files to GDrive
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
↘️ Sending Zipped Data to Google Drive - $program_var
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
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
|
||||
|
||||
rclone moveto ${tarlocation}/${program_var}.tar \
|
||||
--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
|
||||
|
||||
##### Restart Docker Application if was Running Prior
|
||||
if [[ "$running" == "1" ]]; then
|
||||
echo "↘️ Restarting Docker Application - $program_var"
|
||||
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"
|
||||
|
||||
useragent="$(cat /var/plexguide/uagent 1>/dev/null 2>&1)"
|
||||
bwlimit="$(cat /var/plexguide/blitz.bw 1>/dev/null 2>&1)"
|
||||
|
||||
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)"
|
||||
|
||||
rclone --config /opt/appdata/plexguide/rclone.conf mkdir gdrive:/plexguide/backup/${server_id} 1>/dev/null 2>&1
|
||||
|
||||
rclone moveto ${tarlocation}/${program_var}.tar \
|
||||
gdrive:/plexguide/backup/${server_id}/${program_var}.tar \
|
||||
--config /opt/appdata/plexguide/rclone.conf \
|
||||
-v --checksum --stats-one-line --stats 1s --progress \
|
||||
--tpslimit=10 \
|
||||
--checkers="$vfs_c" \
|
||||
--transfers="$vfs_t" \
|
||||
--no-traverse \
|
||||
--fast-list \
|
||||
--bwlimit="$bwlimit" \
|
||||
--drive-chunk-size="$vfs_dcs" \
|
||||
--user-agent="$useragent"
|
||||
--config /opt/appdata/plexguide/rclone.conf \
|
||||
-v --checksum --stats-one-line --stats 1s --progress \
|
||||
--tpslimit=10 \
|
||||
--checkers="$vfs_c" \
|
||||
--transfers="$vfs_t" \
|
||||
--no-traverse \
|
||||
--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
|
||||
|
||||
##### Remove File Incase
|
||||
rm -rf ${tarlocation}/${program_var}.tar 1>/dev/null 2>&1
|
||||
}
|
||||
|
||||
##### 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
|
||||
}
|
||||
|
||||
@@ -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 PG does not format the
|
||||
location is very important! Keep in mind Pandaura does not format the
|
||||
location for you!
|
||||
|
||||
Examples:
|
||||
@@ -19,17 +19,15 @@ 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
|
||||
read -p 'TYPE the location | Press [ENTER]: ' typed </dev/tty
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⚠️ NOTICE: Checking - $typed's existance ! Please Standby
|
||||
⚠️ NOTICE: Checking - $typed's existance. Please standby...
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
@@ -38,83 +36,82 @@ 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
|
||||
bash /opt/plexguide/menu/interface/serverid.sh
|
||||
exit
|
||||
else
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
typed2=$typed
|
||||
bonehead=no
|
||||
##### If BONEHEAD forgot to add a / in the beginning, we fix for them
|
||||
initial="$(echo $typed | head -c 1)"
|
||||
if [ "$initial" != "/" ]; then
|
||||
typed="/$typed"
|
||||
bonehead=yes
|
||||
fi
|
||||
##### If BONEHEAD added a / at the end, we fix for them
|
||||
initial="${typed: -1}"
|
||||
if [ "$initial" == "/" ]; then
|
||||
typed=${typed::-1}
|
||||
bonehead=yes
|
||||
fi
|
||||
|
||||
##### Notify User is a Bonehead
|
||||
if [ "$bonehead" == "yes" ]; then
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
typed2=$typed
|
||||
bonehead=no
|
||||
##### If BONEHEAD forgot to add a / in the beginning, we fix for them
|
||||
initial="$(echo $typed | head -c 1)"
|
||||
if [ "$initial" != "/" ]; then
|
||||
typed="/$typed"
|
||||
bonehead=yes
|
||||
fi
|
||||
##### If BONEHEAD added a / at the end, we fix for them
|
||||
initial="${typed: -1}"
|
||||
if [ "$initial" == "/" ]; then
|
||||
typed=${typed::-1}
|
||||
bonehead=yes
|
||||
fi
|
||||
|
||||
##### Notify User is a Bonehead
|
||||
if [ "$bonehead" == "yes" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ ALERT! We fixed the typos for you! Yes, Your Welcome!
|
||||
⛔️ ALERT! We fixed the typos for you! Yes, you're welcome.
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
You Typed : $typed2
|
||||
Changed To: $typed
|
||||
|
||||
EOF
|
||||
read -n 1 -s -r -p "Press [ANY KEY] to Continue "
|
||||
echo ""
|
||||
fi
|
||||
|
||||
#################################################### TYPED CHECKERS - END
|
||||
|
||||
mkdir "$typed/pgcheck" &>/dev/null
|
||||
# Recalls for to check existance
|
||||
rcheck=$(ls -la $typed | grep "\<pgcheck\>")
|
||||
if [ "$rcheck" == "" ]; then
|
||||
read -n 1 -s -r -p "Press [ANY KEY] to continue "
|
||||
echo ""
|
||||
fi
|
||||
|
||||
#################################################### TYPED CHECKERS - END
|
||||
|
||||
mkdir "$typed/pgcheck" &>/dev/null
|
||||
# Recalls for to check existance
|
||||
rcheck=$(ls -la $typed | grep "\<pgcheck\>")
|
||||
if [ "$rcheck" == "" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ WARNING! - This Location Does Not Exist! Exiting! (Case Senstive)
|
||||
⛔️ WARNING! - This location does not exist! Exiting... (Case senstive)
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
sleep 4
|
||||
exit
|
||||
fi
|
||||
|
||||
sleep 4
|
||||
exit
|
||||
fi
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ PASS: Location! Storing the Name of the Location!
|
||||
✅️ PASS: Location! Storing the name of the location!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
# Prevents From Repeating
|
||||
rm -rf $typed/pgcheck
|
||||
sleep 3
|
||||
|
||||
# Prevents From Repeating
|
||||
rm -rf $typed/pgcheck
|
||||
sleep 3
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🌇 PASS: Process Complete!
|
||||
🌇 PASS: Process complete!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
echo "$typed" >/var/plexguide/data.location
|
||||
read -n 1 -s -r -p "Press [ANY] Key to Continue "
|
||||
|
||||
echo "$typed" >/var/plexguide/data.location
|
||||
read -n 1 -s -r -p "Press [ANY] Key to Continue "
|
||||
|
||||
fi
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,8 +5,8 @@
|
||||
# URL: https://pgblitz.com - http://github.pgblitz.com
|
||||
# GNU: General Public License v3.0
|
||||
################################################################################
|
||||
source /opt/pgvault/functions.sh
|
||||
source /opt/pgvault/pgvault.func
|
||||
source /opt/plexguide/menu/pgvault/functions.sh
|
||||
source /opt/plexguide/menu/functions/pgvault.func
|
||||
file="/var/plexguide/restore.id"
|
||||
if [ ! -e "$file" ]; then
|
||||
echo "[NOT-SET]" >/var/plexguide/restore.id
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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:
|
||||
|
||||
@@ -7,30 +7,30 @@
|
||||
################################################################################
|
||||
|
||||
# FUNCTIONS START ##############################################################
|
||||
|
||||
typed="${typed,,}"
|
||||
# BAD INPUT
|
||||
badinput() {
|
||||
echo
|
||||
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p '⚠️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
badinput2() {
|
||||
echo
|
||||
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question2
|
||||
echo
|
||||
read -p '⚠️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question2
|
||||
}
|
||||
|
||||
tokenstatus() {
|
||||
ptokendep=$(cat /var/plexguide/plex.token)
|
||||
if [ "$ptokendep" != "" ]; then
|
||||
PGSELFTEST=$(curl -LI "http://$(hostname -I | awk '{print $1}'):32400/system?X-Plex-Token=$(cat /var/plexguide/plex.token)" -o /dev/null -w '%{http_code}\n' -s)
|
||||
if [[ $PGSELFTEST -ge 200 && $PGSELFTEST -le 299 ]]; then
|
||||
pstatus="✅ DEPLOYED"
|
||||
else
|
||||
pstatus="❌ DEPLOYED BUT TOKEN FAILED"
|
||||
fi
|
||||
else pstatus="⚠️ NOT DEPLOYED"; fi
|
||||
ptokendep=$(cat /var/plexguide/plex.token)
|
||||
if [ "$ptokendep" != "" ]; then
|
||||
PGSELFTEST=$(curl -LI "http://$(hostname -I | awk '{print $1}'):32400/system?X-Plex-Token=$(cat /var/plexguide/plex.token)" -o /dev/null -w '%{http_code}\n' -s)
|
||||
if [[ $PGSELFTEST -ge 200 && $PGSELFTEST -le 299 ]]; then
|
||||
pstatus="✅ DEPLOYED"
|
||||
else
|
||||
pstatus="❌ DEPLOYED BUT TOKEN FAILED"
|
||||
fi
|
||||
else pstatus="⚠️ NOT DEPLOYED"; fi
|
||||
}
|
||||
|
||||
# FIRST QUESTION
|
||||
@@ -39,7 +39,7 @@ question1() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🌎 PlexToken Generator
|
||||
🛈 PlexToken Generator
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
Token Status : [$pstatus]
|
||||
@@ -52,38 +52,38 @@ Token Status : [$pstatus]
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
echo
|
||||
|
||||
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
|
||||
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
echo
|
||||
|
||||
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
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🍖 NOM NOM - Saved Your Information!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 3
|
||||
question2
|
||||
elif [ "$typed" == "2" ]; then
|
||||
|
||||
sleep 3
|
||||
question2
|
||||
elif [ "${typed}" == "2" ]; then
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🍖 NOM NOM - Read Your Information!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 3
|
||||
tokenexist
|
||||
|
||||
pw=$(cat /var/plexguide/plex.pw)
|
||||
user=$(cat /var/plexguide/plex.user)
|
||||
|
||||
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
|
||||
exit
|
||||
else badinput; fi
|
||||
sleep 3
|
||||
tokenexist
|
||||
|
||||
pw=$(cat /var/plexguide/plex.pw)
|
||||
user=$(cat /var/plexguide/plex.user)
|
||||
|
||||
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
exit
|
||||
else badinput; fi
|
||||
}
|
||||
|
||||
question2() {
|
||||
@@ -106,9 +106,9 @@ User Pass: $pw
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [ "$typed" == "1" ]; then
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [ "$typed" == "1" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -118,70 +118,70 @@ EOF
|
||||
NOTE: If the token is bad, this process will repeat again!
|
||||
|
||||
EOF
|
||||
sleep 4
|
||||
question3
|
||||
elif [ "$typed" == "2" ]; then
|
||||
question1
|
||||
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
|
||||
exit
|
||||
else badinput2; fi
|
||||
sleep 4
|
||||
question3
|
||||
elif [ "$typed" == "2" ]; then
|
||||
question1
|
||||
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
|
||||
exit
|
||||
else badinput2; fi
|
||||
}
|
||||
|
||||
question3() {
|
||||
echo "$pw" >/var/plexguide/plex.pw
|
||||
echo "$user" >/var/plexguide/plex.user
|
||||
ansible-playbook /opt/plexguide/menu/plex/token.yml
|
||||
token=$(cat /var/plexguide/plex.token)
|
||||
if [ "$token" != "" ]; then
|
||||
echo "$pw" >/var/plexguide/plex.pw
|
||||
echo "$user" >/var/plexguide/plex.user
|
||||
ansible-playbook /opt/plexguide/menu/plex/token.yml
|
||||
token=$(cat /var/plexguide/plex.token)
|
||||
if [ "$token" != "" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ PlexToken Generation Succeeded!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 4
|
||||
else
|
||||
sleep 4
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ PlexToken Generation Failed!
|
||||
⚠️ PlexToken Generation Failed!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
NOTE: Process will repeat until you succeed or exit!
|
||||
|
||||
EOF
|
||||
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
tokenexist(){
|
||||
pw=$(cat /var/plexguide/plex.pw)
|
||||
user=$(cat /var/plexguide/plex.user)
|
||||
ansible-playbook /opt/plexguide/menu/plex/token.yml
|
||||
token=$(cat /var/plexguide/plex.token)
|
||||
token=$(cat /var/plexguide/plex.token)
|
||||
if [ "$token" != "" ]; then
|
||||
pw=$(cat /var/plexguide/plex.pw)
|
||||
user=$(cat /var/plexguide/plex.user)
|
||||
ansible-playbook /opt/plexguide/menu/plex/token.yml
|
||||
token=$(cat /var/plexguide/plex.token)
|
||||
token=$(cat /var/plexguide/plex.token)
|
||||
if [ "$token" != "" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ PlexToken Generation Succeeded!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 4
|
||||
else
|
||||
sleep 4
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ PlexToken Generation Failed!
|
||||
⚠️ PlexToken Generation Failed!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
NOTE: Process will repeat until you succeed or exit!
|
||||
|
||||
EOF
|
||||
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
# FUNCTIONS END ##############################################################
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
################################################################################
|
||||
|
||||
# FUNCTIONS START ##############################################################
|
||||
|
||||
typed="${typed,,}"
|
||||
# BAD INPUT
|
||||
badinput() {
|
||||
echo
|
||||
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p '⚠️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
badinput2() {
|
||||
echo
|
||||
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question2
|
||||
echo
|
||||
read -p '⚠️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question2
|
||||
}
|
||||
|
||||
# FIRST QUESTION
|
||||
@@ -26,7 +26,7 @@ question1() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🌎 Plex User Name Store
|
||||
🛈 Plex User Name Store
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[1] - Generate stored details for Plex Dupefinder
|
||||
@@ -35,38 +35,38 @@ question1() {
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
echo
|
||||
|
||||
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
|
||||
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
echo
|
||||
|
||||
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
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🍖 NOM NOM - Saved Your Information!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 3
|
||||
question2
|
||||
elif [ "$typed" == "2" ]; then
|
||||
|
||||
sleep 3
|
||||
question2
|
||||
elif [ "${typed}" == "2" ]; then
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🍖 NOM NOM - Read Your Information!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 3
|
||||
question 2
|
||||
|
||||
pw=$(cat /var/plex_dupe/plex.pw)
|
||||
user=$(cat /var/plex_dupe/plex.user)
|
||||
|
||||
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
|
||||
exit
|
||||
else badinput; fi
|
||||
sleep 3
|
||||
question 2
|
||||
|
||||
pw=$(cat /var/plex_dupe/plex.pw)
|
||||
user=$(cat /var/plex_dupe/plex.user)
|
||||
|
||||
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
exit
|
||||
else badinput; fi
|
||||
}
|
||||
|
||||
question2() {
|
||||
@@ -90,9 +90,9 @@ User Pass: [ $pw ]
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [ "$typed" == "1" ]; then
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [ "${typed}" == "1" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -102,42 +102,42 @@ EOF
|
||||
NOTE: If the token is bad, this process will repeat again!
|
||||
|
||||
EOF
|
||||
sleep 4
|
||||
question3
|
||||
elif [ "$typed" == "2" ]; then
|
||||
question1
|
||||
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
|
||||
exit
|
||||
else badinput2; fi
|
||||
sleep 4
|
||||
question3
|
||||
elif [ "${typed}" == "2" ]; then
|
||||
question1
|
||||
elif [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
exit
|
||||
else badinput2; fi
|
||||
}
|
||||
|
||||
question3() {
|
||||
echo "$pw" >/var/plex_dupe/plex.pw
|
||||
echo "$user" >/var/plex_dupe/plex.user
|
||||
|
||||
bash /opt/plexguide/menu/plex_dupe/scripts/plex_token.sh
|
||||
|
||||
token=$(cat /var/plex_dupe/plex.token)
|
||||
if [ "$token" != "" ]; then
|
||||
echo "$pw" >/var/plex_dupe/plex.pw
|
||||
echo "$user" >/var/plex_dupe/plex.user
|
||||
|
||||
bash /opt/plexguide/menu/plex_dupe/scripts/plex_token.sh
|
||||
|
||||
token=$(cat /var/plex_dupe/plex.token)
|
||||
if [ "$token" != "" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ Details stored Succeeded!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 4
|
||||
else
|
||||
sleep 4
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ Details Failed!
|
||||
⚠️ Details Failed!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
NOTE: Process will repeat until you succeed or exit!
|
||||
|
||||
EOF
|
||||
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
question1
|
||||
question1
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
@@ -7,48 +7,48 @@
|
||||
################################################################################
|
||||
|
||||
# FUNCTIONS START ##############################################################
|
||||
|
||||
typed="${typed,,}"
|
||||
# BAD INPUT
|
||||
badinput() {
|
||||
echo
|
||||
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p '⚠️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
badinput2() {
|
||||
echo
|
||||
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question2
|
||||
echo
|
||||
read -p '⚠️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question2
|
||||
}
|
||||
|
||||
question1() {
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🌎 PlexToken Generator
|
||||
🛈 PlexToken Generator
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
Generate new Token for Plex Patrol
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p '↘️ PRESS [ENTER] ' typed </dev/tty
|
||||
|
||||
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
|
||||
|
||||
read -p '↘️ PRESS [ENTER] ' typed </dev/tty
|
||||
|
||||
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
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🍖 NOM NOM - Saved Your Information!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 3
|
||||
question2
|
||||
;;
|
||||
esac
|
||||
sleep 3
|
||||
question2
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
question2() {
|
||||
@@ -71,9 +71,9 @@ User Pass: $pw
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [ "$typed" == "1" ]; then
|
||||
read -p 'Make a Selection | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [ "${typed}" == "1" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -83,22 +83,22 @@ EOF
|
||||
NOTE: If the token is bad, this process will repeat again!
|
||||
|
||||
EOF
|
||||
sleep 4
|
||||
question3
|
||||
elif [ "$typed" == "2" ]; then
|
||||
question1
|
||||
elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then
|
||||
exit
|
||||
else badinput2; fi
|
||||
sleep 4
|
||||
question3
|
||||
elif [ "${typed}" == "2" ]; then
|
||||
question1
|
||||
elif [[ "${typed}" == "z" ]]; then
|
||||
exit
|
||||
else badinput2; fi
|
||||
}
|
||||
|
||||
question3() {
|
||||
echo "$pw" >/var/plexguide/plexpatrol/plex.pw
|
||||
echo "$user" >/var/plexguide/plexpatrol/plex.user
|
||||
PLEX_LOGIN=$(cat /var/plexguide/plexpatrol/plex.user)
|
||||
PLEX_PASSWORD=$(cat /var/plexguide/plexpatrol/plex.pw)
|
||||
|
||||
curl -qu "${PLEX_LOGIN}":"${PLEX_PASSWORD}" 'https://plex.tv/users/sign_in.xml' \
|
||||
echo "$pw" >/var/plexguide/plexpatrol/plex.pw
|
||||
echo "$user" >/var/plexguide/plexpatrol/plex.user
|
||||
PLEX_LOGIN=$(cat /var/plexguide/plexpatrol/plex.user)
|
||||
PLEX_PASSWORD=$(cat /var/plexguide/plexpatrol/plex.pw)
|
||||
|
||||
curl -qu "${PLEX_LOGIN}":"${PLEX_PASSWORD}" 'https://plex.tv/users/sign_in.xml' \
|
||||
-X POST -H 'X-Plex-Device-Name: PlexMediaServer' \
|
||||
-H 'X-Plex-Provides: server' \
|
||||
-H 'X-Plex-Version: 0.9' \
|
||||
@@ -107,37 +107,37 @@ curl -qu "${PLEX_LOGIN}":"${PLEX_PASSWORD}" 'https://plex.tv/users/sign_in.xml'
|
||||
-H 'X-Plex-Product: Plex Media Server'\
|
||||
-H 'X-Plex-Device: Linux'\
|
||||
-H 'X-Plex-Client-Identifier: XXXX' --compressed >/tmp/plex_sign_in
|
||||
X_PLEX_TOKEN=$(sed -n 's/.*<authentication-token>\(.*\)<\/authentication-token>.*/\1/p' /tmp/plex_sign_in)
|
||||
if [ -z "$X_PLEX_TOKEN" ]; then
|
||||
cat /tmp/plex_sign_in
|
||||
rm -f /tmp/plex_sign_in
|
||||
>&2 echo 'Failed to retrieve the X-Plex-Token.'
|
||||
exit 1
|
||||
fi
|
||||
echo $X_PLEX_TOKEN >/var/plexguide/plexpatrol/plex.token
|
||||
|
||||
token=$(cat /var/plexguide/plexpatrol/plex.token)
|
||||
if [ "$token" != "" ]; then
|
||||
X_PLEX_TOKEN=$(sed -n 's/.*<authentication-token>\(.*\)<\/authentication-token>.*/\1/p' /tmp/plex_sign_in)
|
||||
if [ -z "$X_PLEX_TOKEN" ]; then
|
||||
cat /tmp/plex_sign_in
|
||||
rm -f /tmp/plex_sign_in
|
||||
>&2 echo 'Failed to retrieve the X-Plex-Token.'
|
||||
exit 1
|
||||
fi
|
||||
echo $X_PLEX_TOKEN >/var/plexguide/plexpatrol/plex.token
|
||||
|
||||
token=$(cat /var/plexguide/plexpatrol/plex.token)
|
||||
if [ "$token" != "" ]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅️ PlexToken Generation Succeeded!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 4
|
||||
else
|
||||
sleep 4
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ PlexToken Generation Failed!
|
||||
⚠️ PlexToken Generation Failed!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
NOTE: Process will repeat until you succeed or exit!
|
||||
|
||||
EOF
|
||||
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
read -p 'Confirm Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
# FUNCTIONS END ##############################################################
|
||||
|
||||
@@ -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
|
||||
[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)
|
||||
|
||||
@@ -22,17 +22,17 @@ count=$(wc -l </var/plexguide/container.running)
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⚠️ PortGuard - Rebuilding Containers!
|
||||
🛈 PortGuard - Rebuilding containers
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
sleep 2
|
||||
sleep 1
|
||||
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 Rebuilt!
|
||||
🛈 PortGuard - All containers are rebuilt ✔️
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -p 'Continue? | Press [ENTER] ' name </dev/tty
|
||||
read -p 'Continue | Press [ENTER] ' name </dev/tty
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
# 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
|
||||
@@ -39,7 +43,7 @@ primestart() {
|
||||
wisword=$(/usr/games/fortune -as | sed "s/^/ /")
|
||||
|
||||
varstart() {
|
||||
###################### FOR VARIABLS ROLE SO DOESNT CREATE RED - START
|
||||
###################### FOR VARIABLES ROLE SO DOESNT CREATE RED - START
|
||||
filevg="/var/plexguide"
|
||||
if [ ! -e "$filevg" ]; then
|
||||
mkdir -p $filevg/logs 1>/dev/null 2>&1
|
||||
@@ -53,7 +57,7 @@ varstart() {
|
||||
chmod -R 775 $fileag 1>/dev/null 2>&1
|
||||
fi
|
||||
|
||||
###################### FOR VARIABLS ROLE SO DOESNT CREATE RED - START
|
||||
###################### FOR VARIABLES ROLE SO DOESNT CREATE RED - START
|
||||
variable $filevg/pgfork.project "NOT-SET"
|
||||
variable $filevg/pgfork.version "NOT-SET"
|
||||
variable $filevg/tld.program "NOT-SET"
|
||||
@@ -66,6 +70,7 @@ 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)
|
||||
@@ -98,7 +103,7 @@ varstart() {
|
||||
|
||||
# For PG UI - Force Variable to Set
|
||||
ports=$(cat /var/plexguide/server.ports)
|
||||
if [ "$ports" == "" ]; then
|
||||
if [ "$ports" == "" ]; then
|
||||
echo "Open" >$filevg/pg.ports
|
||||
else echo "Closed" >$filevg/pg.ports; fi
|
||||
|
||||
@@ -153,65 +158,32 @@ menuprime1
|
||||
else menuprime2; fi
|
||||
}
|
||||
|
||||
menuprime1() {
|
||||
transport=$(cat /var/plexguide/pg.transport)
|
||||
|
||||
# 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
|
||||
menuprime1() { # GCE Optimised Menu
|
||||
transport=$(cat /var/plexguide/pg.transport)
|
||||
top_menu
|
||||
disk_space_used_space
|
||||
|
||||
# Declare Ports State
|
||||
ports=$(cat /var/plexguide/server.ports)
|
||||
|
||||
if [ "$ports" == "" ]; then
|
||||
ports="OPEN"
|
||||
else ports="CLOSED"; fi
|
||||
if [ "$ports" == "" ]; then
|
||||
echo "Open" >$filevg/pg.ports
|
||||
else echo "Closed" >$filevg/pg.ports; fi
|
||||
|
||||
tee <<-EOF
|
||||
-- GCE optimized surface --
|
||||
|
||||
[1] PTS-Traefik : Reverse Proxy
|
||||
[1] Traefik : Reverse Proxy | Domain Setup
|
||||
[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
|
||||
[6] PTS-Vault : Backup & Restore
|
||||
[7] Traktarr : Fill Sonarr/Radarr over Trakt lists.
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[Z] Exit
|
||||
|
||||
"$wisword"
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
[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
|
||||
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 ;;
|
||||
@@ -219,98 +191,136 @@ EOF
|
||||
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/pgcloner/pgvault.sh && clear && primestart ;;
|
||||
6) clear && bash /opt/plexguide/menu/pgvault/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
|
||||
|
||||
menuprime2() {
|
||||
}
|
||||
security() {
|
||||
top_menu
|
||||
sub_menu_security
|
||||
end_menu
|
||||
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/shield/pgshield.sh; fi
|
||||
if [[ "${typed}" == "d" ]]; then clear && bash /opt/plexguide/menu/portguard/portguard.sh; fi
|
||||
if [[ "${typed}" == "c" ]]; then clear && bash /opt/plexguide/menu/pgbox/core/core.sh; fi
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
main_menu_options
|
||||
}
|
||||
|
||||
mount() {
|
||||
top_menu
|
||||
sub_menu_mount
|
||||
end_menu
|
||||
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgcloner/pgclone.sh && clear && primestart; fi
|
||||
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/portguard/portguard.sh; fi
|
||||
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgbox/core/core.sh; fi
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
main_menu_options
|
||||
}
|
||||
apps() {
|
||||
top_menu
|
||||
sub_menu_app
|
||||
end_menu
|
||||
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgbox/core/core.sh; fi
|
||||
if [[ "${typed}" == "d" ]]; then clear && bash /opt/plexguide/menu/pgbox/community/community.sh; fi
|
||||
if [[ "${typed}" == "c" ]]; then clear && bash /opt/plexguide/menu/pgbox/personal/personal.sh; fi
|
||||
if [[ "${typed}" == "r" ]]; then clear && bash /opt/plexguide/menu/pgbox/remove/removal.sh; fi
|
||||
if [[ "${typed}" == "f" ]]; then clear && bash /opt/plexguide/menu/pgbox/remove/removal.sh; fi
|
||||
if [[ "${typed}" == "t" ]]; then clear && bash /opt/plexguide/menu/pgbox/customparts/autobackup.sh; fi
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
main_menu_options
|
||||
}
|
||||
vault() {
|
||||
source /opt/plexguide/menu/functions/pgvault.func
|
||||
top_menu
|
||||
sub_menu_vault
|
||||
end_menu
|
||||
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
if [[ "${typed}" == "e" ]]; then clear && bash /opt/plexguide/menu/pgvault/pgvault.sh; fi
|
||||
if [[ "${typed}" == "d" ]]; then clear && backup_all_start; fi
|
||||
if [[ "${typed}" == "c" ]]; then clear && initial && pgboxrecall && apprecall && vaultrestore; fi
|
||||
if [[ "${typed}" == "r" ]]; then clear && restore_all_start; fi
|
||||
if [[ "${typed}" == "f" ]]; then clear && bash /opt/plexguide/menu/pgvault/location.sh; fi
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then exit; fi
|
||||
main_menu_options
|
||||
}
|
||||
menuprime2() { #
|
||||
#welcome="Welcome to Pandaura. Thanks for being a part of the community"
|
||||
#firstRun=True
|
||||
#def writeFile(number):
|
||||
# global firstRun
|
||||
# if firstRun:
|
||||
# print("${welcome}")
|
||||
# firstRun=False
|
||||
#print(str(number))
|
||||
|
||||
#for i in range(10):
|
||||
# writeFile(i)
|
||||
#downloadpg
|
||||
transport=$(cat /var/plexguide/pg.transport)
|
||||
|
||||
# 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
|
||||
|
||||
top_menu
|
||||
disk_space_used_space
|
||||
main_menu
|
||||
# Declare Ports State
|
||||
ports=$(cat /var/plexguide/server.ports)
|
||||
|
||||
if [ "$ports" == "" ]; then
|
||||
ports="OPEN"
|
||||
else ports="CLOSED"; fi
|
||||
ports="🔴 "
|
||||
else ports="🟢"; fi
|
||||
|
||||
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
|
||||
|
||||
"$wisword"
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
#if [[ "${typed}" == "2" ]]; then sub_menu_security; fi
|
||||
end_menu
|
||||
# Standby
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
read -p '💬 Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
|
||||
|
||||
|
||||
Used disk space: $used of $capacity | $percentage used capacity Deployed
|
||||
EOF
|
||||
main_menu_options() {
|
||||
case $typed in
|
||||
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 ;;
|
||||
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 ;;
|
||||
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
|
||||
|
||||
@@ -10,54 +10,54 @@
|
||||
mkdir -p /var/plexguide/traktarr/
|
||||
|
||||
# FUNCTIONS START ##############################################################
|
||||
|
||||
typed="${typed,,}"
|
||||
# FIRST FUNCTION
|
||||
variable() {
|
||||
file="$1"
|
||||
if [ ! -e "$file" ]; then echo "$2" >$1; fi
|
||||
file="$1"
|
||||
if [ ! -e "$file" ]; then echo "$2" >$1; fi
|
||||
}
|
||||
|
||||
deploycheck() {
|
||||
dcheck=$(systemctl is-active traktarr.service)
|
||||
if [ "$dcheck" == "active" ]; then
|
||||
dstatus="✅ DEPLOYED"
|
||||
else dstatus="⚠️ NOT DEPLOYED"; fi
|
||||
dcheck=$(systemctl is-active traktarr.service)
|
||||
if [ "$dcheck" == "active" ]; then
|
||||
dstatus="✅ DEPLOYED"
|
||||
else dstatus="⚠️ NOT DEPLOYED"; fi
|
||||
}
|
||||
|
||||
sonarrcheck() {
|
||||
pcheck=$(docker ps --format '{{.Names}}' | grep "sonarr")
|
||||
if [ "$pcheck" == "" ]; then
|
||||
|
||||
pcheck=$(docker ps --format '{{.Names}}' | grep "sonarr")
|
||||
if [ "$pcheck" == "" ]; then
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ WARNING! - Sonarr is not Installed/Running! Cannot Proceed!
|
||||
⚠️ WARNING! - Sonarr is not Installed/Running! Cannot Proceed!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
radarrcheck() {
|
||||
pcheck=$(docker ps --format '{{.Names}}' | grep "radarr")
|
||||
if [ "$pcheck" == "" ]; then
|
||||
|
||||
pcheck=$(docker ps --format '{{.Names}}' | grep "radarr")
|
||||
if [ "$pcheck" == "" ]; then
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ WARNING! - Radarr is not Installed/Running! Cannot Proceed!
|
||||
⚠️ WARNING! - Radarr is not Installed/Running! Cannot Proceed!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
squality() {
|
||||
sonarrcheck
|
||||
sonarrcheck
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -80,30 +80,30 @@ HD - 720p/1080p
|
||||
Go Back? Type > exit
|
||||
|
||||
EOF
|
||||
read -p '↘️ Type Sonarr Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
question1
|
||||
else
|
||||
read -p '↘️ Type Sonarr Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
question1
|
||||
else
|
||||
tee <<-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
|
||||
question1
|
||||
fi
|
||||
|
||||
echo "${typed}" >/var/plexguide/traktarr/pgtrak.sprofile
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
rquality() {
|
||||
radarrcheck
|
||||
radarrcheck
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -126,25 +126,25 @@ HD - 720p/1080p
|
||||
Go Back? Type > exit
|
||||
|
||||
EOF
|
||||
read -p '↘️ Type Radarr Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
question1
|
||||
else
|
||||
read -p '↘️ Type Radarr Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
question1
|
||||
else
|
||||
tee <<-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
|
||||
question1
|
||||
fi
|
||||
|
||||
echo "${typed}" >/var/plexguide/traktarr/pgtrak.rprofile
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
api() {
|
||||
@@ -169,14 +169,14 @@ Go Back? Type > exit
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty
|
||||
echo $typed >/var/plexguide/traktarr/pgtrak.client
|
||||
read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty
|
||||
echo $typed >/var/plexguide/traktarr/pgtrak.secret
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
question1
|
||||
else
|
||||
read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty
|
||||
echo ${typed} >/var/plexguide/traktarr/pgtrak.client
|
||||
read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty
|
||||
echo ${typed} >/var/plexguide/traktarr/pgtrak.secret
|
||||
|
||||
if [[ "${typed}" == "exit" || "${typed}" == "z" ]]; then
|
||||
question1
|
||||
else
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -189,16 +189,16 @@ NOTE: The API Client and Secret is set! Ensure to setup your <paths> and
|
||||
INFO: Messed up? Rerun this API Interface to update the information!
|
||||
|
||||
EOF
|
||||
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
spath() {
|
||||
hdpath=$(cat /var/plexguide/server.hd.path)
|
||||
tvfolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'TV*|tv')
|
||||
sonarrcheck
|
||||
hdpath=$(cat /var/plexguide/server.hd.path)
|
||||
tvfolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'TV*|tv')
|
||||
sonarrcheck
|
||||
tee <<-EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
📁 Sonarr Path
|
||||
@@ -216,47 +216,47 @@ $tvfolderprint
|
||||
Go Back? Type > exit
|
||||
|
||||
EOF
|
||||
read -p '↘️ Type Sonarr Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
question1
|
||||
else
|
||||
read -p '↘️ Type Sonarr Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "exit" || "${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
|
||||
bonehead=no
|
||||
##### If user forgot to add a / in the beginning, we fix for them
|
||||
initial="$(echo $typed | head -c 1)"
|
||||
if [ "$initial" != "/" ]; then
|
||||
typed="/$typed"
|
||||
fi
|
||||
##### If user added a / at the end, we fix for them
|
||||
initial="${typed: -1}"
|
||||
if [ "$initial" == "/" ]; then
|
||||
typed=${typed::-1}
|
||||
fi
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
sleep 1.5
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
typed2=${typed}
|
||||
bonehead=no
|
||||
##### If user forgot to add a / in the beginning, we fix for them
|
||||
initial="$(echo ${typed} | head -c 1)"
|
||||
if [ "$initial" != "/" ]; then
|
||||
typed="/${typed}"
|
||||
fi
|
||||
##### If user added a / at the end, we fix for them
|
||||
initial="${typed: -1}"
|
||||
if [ "$initial" == "/" ]; then
|
||||
typed=${typed::-1}
|
||||
fi
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
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
|
||||
|
||||
file="$typed/test"
|
||||
if [ -e "$file" ]; then
|
||||
|
||||
sleep 1.5
|
||||
|
||||
mkdir ${typed}/test 1>/dev/null 2>&1
|
||||
|
||||
file="${typed}/test"
|
||||
if [ -e "$file" ]; then
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -264,22 +264,22 @@ EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
|
||||
### Removes /mnt if /mnt/unionfs exists
|
||||
#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 ""
|
||||
question1
|
||||
else
|
||||
|
||||
### Removes /mnt if /mnt/unionfs exists
|
||||
#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 ""
|
||||
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,17 +288,17 @@ Advice: Exit PTS and (Test) Type >>> mkdir $typed/testfolder
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
echo "" && question1
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
echo "" && question1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
rpath() {
|
||||
hdpath=$(cat /var/plexguide/server.hd.path)
|
||||
moviefolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'Movi*|movi*')
|
||||
radarrcheck
|
||||
hdpath=$(cat /var/plexguide/server.hd.path)
|
||||
moviefolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'Movi*|movi*')
|
||||
radarrcheck
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -318,47 +318,47 @@ $moviefolderprint
|
||||
Go Back? Type > exit
|
||||
|
||||
EOF
|
||||
read -p '↘️ Type Radarr Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
question1
|
||||
else
|
||||
read -p '↘️ Type Radarr Location | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
if [[ "${typed}" == "exit" || "${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
|
||||
bonehead=no
|
||||
##### If user forgot to add a / in the beginning, we fix for them
|
||||
initial="$(echo $typed | head -c 1)"
|
||||
if [ "$initial" != "/" ]; then
|
||||
typed="/$typed"
|
||||
fi
|
||||
##### If user added a / at the end, we fix for them
|
||||
initial="${typed: -1}"
|
||||
if [ "$initial" == "/" ]; then
|
||||
typed=${typed::-1}
|
||||
fi
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
sleep 1.5
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
typed2=${typed}
|
||||
bonehead=no
|
||||
##### If user forgot to add a / in the beginning, we fix for them
|
||||
initial="$(echo ${typed} | head -c 1)"
|
||||
if [ "$initial" != "/" ]; then
|
||||
typed="/${typed}"
|
||||
fi
|
||||
##### If user added a / at the end, we fix for them
|
||||
initial="${typed: -1}"
|
||||
if [ "$initial" == "/" ]; then
|
||||
typed=${typed::-1}
|
||||
fi
|
||||
|
||||
##################################################### TYPED CHECKERS - START
|
||||
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
|
||||
|
||||
file="$typed/test"
|
||||
if [ -e "$file" ]; then
|
||||
|
||||
sleep 1.5
|
||||
|
||||
mkdir ${typed}/test 1>/dev/null 2>&1
|
||||
|
||||
file="${typed}/test"
|
||||
if [ -e "$file" ]; then
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
@@ -366,84 +366,84 @@ EOF
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
echo "$typed" >/var/plexguide/traktarr/pgtrak.rpath
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
echo ""
|
||||
question1
|
||||
else
|
||||
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
|
||||
echo "" && question1
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
echo "" && question1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
#########################################################################
|
||||
####Custom parts
|
||||
#########################################################################
|
||||
maxyear() {
|
||||
((mnyear=$(date +"%Y")+1))
|
||||
((mxyear=$(date +"%Y")+7))
|
||||
|
||||
((mnyear=$(date +"%Y")+1))
|
||||
((mxyear=$(date +"%Y")+7))
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Limit the maximum allowed year for traktarr
|
||||
🛈 Limit the maximum allowed year for traktarr
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
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
|
||||
else maxyear ; fi
|
||||
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
|
||||
else maxyear ; fi
|
||||
}
|
||||
|
||||
minyear() {
|
||||
((mnyear=$(date +"%Y")-80))
|
||||
((mxyear=$(date +"%Y")-1))
|
||||
|
||||
((mnyear=$(date +"%Y")-80))
|
||||
((mxyear=$(date +"%Y")-1))
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Limit the minimum allowed year for traktarr
|
||||
🛈 Limit the minimum allowed year for traktarr
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
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
|
||||
else minyear ; fi
|
||||
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
|
||||
else minyear ; fi
|
||||
}
|
||||
|
||||
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.
|
||||
|
||||
Note :
|
||||
you have to write it as it really is,
|
||||
Note :
|
||||
you have to write it as it really is,
|
||||
if you make a mistake, it will not be checked for conformity!
|
||||
the first letter must be large, otherwise it will not work
|
||||
|
||||
@@ -451,43 +451,43 @@ Sample:
|
||||
|
||||
English
|
||||
German
|
||||
France
|
||||
France
|
||||
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" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
|
||||
echo -e "English" /var/plexguide/traktarr/pgtrak.lang
|
||||
question1
|
||||
else
|
||||
clear
|
||||
lprofil=$(cat /var/plexguide/traktarr/pgtrak.lang)
|
||||
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
|
||||
echo -e "English" /var/plexguide/traktarr/pgtrak.lang
|
||||
question1
|
||||
else
|
||||
clear
|
||||
lprofil=$(cat /var/plexguide/traktarr/pgtrak.lang)
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
✅ Traktarr Language Profil set
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
You have chosen the language profile = $lprofil
|
||||
|
||||
|
||||
If this is wrong now, traktarr will not work 100%
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
fi
|
||||
}
|
||||
|
||||
avbila() {
|
||||
avacbact=$(cat /var/plexguide/traktarr/pgtrak.minimumavailability)
|
||||
avacbact=$(cat /var/plexguide/traktarr/pgtrak.minimumavailability)
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Set minimum availability movies for Radarr
|
||||
🛈 Set minimum availability movies for Radarr
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
The minimum availability for movies are actually set to
|
||||
The minimum availability for movies are actually set to
|
||||
|
||||
$avacbact
|
||||
|
||||
@@ -500,27 +500,27 @@ Choices are announced, in_cinemas, released (Physical/Web), or predb.
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) echo -e "announced" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
|
||||
2) echo -e "in_cinemas" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
|
||||
3) echo -e "released" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
|
||||
4) echo -e "predb" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) question1 ;;
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) echo -e "announced" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
|
||||
2) echo -e "in_cinemas" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
|
||||
3) echo -e "released" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
|
||||
4) echo -e "predb" >/var/plexguide/traktarr/pgtrak.minimumavailability && question1 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
}
|
||||
##################################################################################
|
||||
##################################################################################
|
||||
credits() {
|
||||
clear
|
||||
chk=$(figlet traktarr | lolcat )
|
||||
clear
|
||||
chk=$(figlet traktarr | lolcat )
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 traktarr Credits
|
||||
🛈 traktarr Credits
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
$chk
|
||||
@@ -540,19 +540,19 @@ $chk
|
||||
#########################################################################
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
prefill() {
|
||||
clear
|
||||
chk=$(figlet traktarr | lolcat )
|
||||
clear
|
||||
chk=$(figlet traktarr | lolcat )
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 traktarr prefilling the system
|
||||
🛈 traktarr prefilling the system
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
[1] Prefilling allowed (Runs a daily job that grabs up to 50 shows and
|
||||
@@ -565,32 +565,32 @@ chk=$(figlet traktarr | lolcat )
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) ansible-playbook /opt/plexguide/menu/traktarr/traktarr-list/prefillallow.yml && question1 ;;
|
||||
2) ansible-playbook /opt/plexguide/menu/traktarr/traktarr-list/prefillremove.yml && question1 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) ansible-playbook /opt/plexguide/menu/traktarr/traktarr-list/prefillallow.yml && question1 ;;
|
||||
2) ansible-playbook /opt/plexguide/menu/traktarr/traktarr-list/prefillremove.yml && question1 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
}
|
||||
# BAD INPUT
|
||||
badinput() {
|
||||
echo
|
||||
read -p '⛔️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p '⚠️ ERROR - BAD INPUT! | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
}
|
||||
|
||||
endbanner() {
|
||||
clear
|
||||
chk=$(figlet traktarr | lolcat )
|
||||
clear
|
||||
chk=$(figlet traktarr | lolcat )
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 traktarr Commands
|
||||
🛈 traktarr Commands
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
$chk
|
||||
@@ -604,65 +604,65 @@ Commands:
|
||||
shows Add multiple shows to Sonarr.
|
||||
|
||||
Args:
|
||||
-t, --list-type TEXT Trakt list to process.
|
||||
For example:
|
||||
'anticipated', 'trending', 'popular',
|
||||
-t, --list-type TEXT Trakt list to process.
|
||||
For example:
|
||||
'anticipated', 'trending', 'popular',
|
||||
'person', 'watched', 'played', 'recommended',
|
||||
'watchlist', or any URL to a list. [required]
|
||||
|
||||
|
||||
-l, --add-limit INTEGER Limit number of movies added to Radarr.
|
||||
-d, --add-delay FLOAT Seconds between each add request to Radarr. [default: 2.5]
|
||||
-s, --sort [rating|release|votes] Sort list to process. [default: votes]
|
||||
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
echo
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
question1
|
||||
}
|
||||
#####################################################################################################################################
|
||||
checkcase() {
|
||||
sonarr=$(docker ps --format '{{.Names}}' | grep "sonarr")
|
||||
radarr=$(docker ps --format '{{.Names}}' | grep "radarr")
|
||||
if [[ "$radarr" == "" ]] && [[ "$sonarr" == "" ]]; then
|
||||
if [[ "$radarr" == "" ]] && [[ "$sonarr" == "" ]]; then
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
⛔️ WARNING! - Sonarr/Radarr is not Installed/Running!
|
||||
⚠️ WARNING! - Sonarr/Radarr is not Installed/Running!
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
EOF
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
exit 0
|
||||
elif [[ "$sonarr" = "sonarr" ]] && [[ "$radarr" = "" ]]; then
|
||||
echo "⛔ WARNING! - Traktarr will only work for shows! Radarr Not Running!" >/var/plexguide/traktarr/docker.status
|
||||
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
|
||||
read -p 'Confirm Info | PRESS [ENTER] ' typed </dev/tty
|
||||
exit 0
|
||||
elif [[ "$sonarr" = "sonarr" ]] && [[ "$radarr" = "" ]]; then
|
||||
echo "⛔ WARNING! - Traktarr will only work for shows! Radarr Not Running!" >/var/plexguide/traktarr/docker.status
|
||||
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
|
||||
}
|
||||
|
||||
question1() {
|
||||
|
||||
api=$(cat /var/plexguide/traktarr/pgtrak.secret)
|
||||
if [ "$api" == "NOT-SET" ]; then api="NOT-SET"; else api="SET"; fi
|
||||
|
||||
rpath=$(cat /var/plexguide/traktarr/pgtrak.rpath)
|
||||
spath=$(cat /var/plexguide/traktarr/pgtrak.spath)
|
||||
rprofile=$(cat /var/plexguide/traktarr/pgtrak.rprofile)
|
||||
sprofile=$(cat /var/plexguide/traktarr/pgtrak.sprofile)
|
||||
mxyear=$(cat /var/plexguide/traktarr/pgtrakyear.max)
|
||||
mnyear=$(cat /var/plexguide/traktarr/pgtrakyear.min)
|
||||
langprofil=$(cat /var/plexguide/traktarr/pgtrak.lang)
|
||||
avmin=$(cat /var/plexguide/traktarr/pgtrak.minimumavailability)
|
||||
status=$(cat /var/plexguide/traktarr/docker.status)
|
||||
|
||||
deploycheck
|
||||
|
||||
|
||||
api=$(cat /var/plexguide/traktarr/pgtrak.secret)
|
||||
if [ "$api" == "NOT-SET" ]; then api="NOT-SET"; else api="SET"; fi
|
||||
|
||||
rpath=$(cat /var/plexguide/traktarr/pgtrak.rpath)
|
||||
spath=$(cat /var/plexguide/traktarr/pgtrak.spath)
|
||||
rprofile=$(cat /var/plexguide/traktarr/pgtrak.rprofile)
|
||||
sprofile=$(cat /var/plexguide/traktarr/pgtrak.sprofile)
|
||||
mxyear=$(cat /var/plexguide/traktarr/pgtrakyear.max)
|
||||
mnyear=$(cat /var/plexguide/traktarr/pgtrakyear.min)
|
||||
langprofil=$(cat /var/plexguide/traktarr/pgtrak.lang)
|
||||
avmin=$(cat /var/plexguide/traktarr/pgtrak.minimumavailability)
|
||||
status=$(cat /var/plexguide/traktarr/docker.status)
|
||||
|
||||
deploycheck
|
||||
|
||||
tee <<-EOF
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
🚀 Traktarr Interface
|
||||
🛈 Traktarr Interface
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
$status
|
||||
@@ -690,84 +690,84 @@ NOTE: Changes Made? Must Redeploy Traktarr when Complete!
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
EOF
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case $typed in
|
||||
1) api && question1 ;;
|
||||
2) spath && question1 ;;
|
||||
3) rpath && question1 ;;
|
||||
4) squality && question1 ;;
|
||||
5) rquality && question1 ;;
|
||||
6) maxyear && question1 ;;
|
||||
7) minyear && question1 ;;
|
||||
8) lang && question1 ;;
|
||||
9) avbila && question1 ;;
|
||||
10)
|
||||
sonarr=$(docker ps --format '{{.Names}}' | grep "sonarr")
|
||||
radarr=$(docker ps --format '{{.Names}}' | grep "radarr")
|
||||
if [ "$radarr" == "" ] && [ "$sonarr" == "" ]; then
|
||||
|
||||
read -p '↘️ Type Number | Press [ENTER]: ' typed </dev/tty
|
||||
|
||||
case ${typed} in
|
||||
1) api && question1 ;;
|
||||
2) spath && question1 ;;
|
||||
3) rpath && question1 ;;
|
||||
4) squality && question1 ;;
|
||||
5) rquality && question1 ;;
|
||||
6) maxyear && question1 ;;
|
||||
7) minyear && question1 ;;
|
||||
8) lang && question1 ;;
|
||||
9) avbila && question1 ;;
|
||||
10)
|
||||
sonarr=$(docker ps --format '{{.Names}}' | grep "sonarr")
|
||||
radarr=$(docker ps --format '{{.Names}}' | grep "radarr")
|
||||
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
|
||||
question1
|
||||
else
|
||||
if [ "$sonarr" = "sonarr" ] && [ "$radarr" = "" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
if [ "$radarr" = "radarr" ] && [ "$sonarr" = "" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
if [ "$radarr" = "radarr" ] && [ "$sonarr" = "sonarr" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
file="/opt/appdata/radarr/config.xml"
|
||||
if [ -e "$file" ]; then
|
||||
info=$(cat /opt/appdata/radarr/config.xml)
|
||||
info=${info#*<ApiKey>} 1>/dev/null 2>&1
|
||||
info1=$(echo ${info:0:32}) 1>/dev/null 2>&1
|
||||
echo "$info1" >/var/plexguide/traktarr/pgtrak.rapi
|
||||
fi
|
||||
|
||||
file="/opt/appdata/sonarr/config.xml"
|
||||
if [ -e "$file" ]; then
|
||||
info=$(cat /opt/appdata/sonarr/config.xml)
|
||||
info=${info#*<ApiKey>} 1>/dev/null 2>&1
|
||||
info2=$(echo ${info:0:32}) 1>/dev/null 2>&1
|
||||
echo "$info2" >/var/plexguide/traktarr/pgtrak.sapi
|
||||
fi
|
||||
fi
|
||||
ansible-playbook /opt/plexguide/menu/pg.yml --tags traktarr && question1 ;;
|
||||
|
||||
11) prefill && clear && question1 ;;
|
||||
12) endbanner && clear && question1 ;;
|
||||
C) credits && clear && question1 ;;
|
||||
c) credits && clear && question1 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
read -p '🛈 Acknowledge Info | Press [ENTER] ' typed </dev/tty
|
||||
fi
|
||||
|
||||
file="/opt/appdata/radarr/config.xml"
|
||||
if [ -e "$file" ]; then
|
||||
info=$(cat /opt/appdata/radarr/config.xml)
|
||||
info=${info#*<ApiKey>} 1>/dev/null 2>&1
|
||||
info1=$(echo ${info:0:32}) 1>/dev/null 2>&1
|
||||
echo "$info1" >/var/plexguide/traktarr/pgtrak.rapi
|
||||
fi
|
||||
|
||||
file="/opt/appdata/sonarr/config.xml"
|
||||
if [ -e "$file" ]; then
|
||||
info=$(cat /opt/appdata/sonarr/config.xml)
|
||||
info=${info#*<ApiKey>} 1>/dev/null 2>&1
|
||||
info2=$(echo ${info:0:32}) 1>/dev/null 2>&1
|
||||
echo "$info2" >/var/plexguide/traktarr/pgtrak.sapi
|
||||
fi
|
||||
fi
|
||||
ansible-playbook /opt/plexguide/menu/pg.yml --tags traktarr && question1 ;;
|
||||
|
||||
11) prefill && clear && question1 ;;
|
||||
12) endbanner && clear && question1 ;;
|
||||
C) credits && clear && question1 ;;
|
||||
c) credits && clear && question1 ;;
|
||||
z) exit ;;
|
||||
Z) exit ;;
|
||||
*) question1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# FUNCTIONS END ##############################################################
|
||||
|
||||
@@ -5,14 +5,175 @@
|
||||
# URL: https://pgblitz.com - http://github.pgblitz.com
|
||||
# GNU: General Public License v3.0
|
||||
################################################################################
|
||||
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
|
||||
}
|
||||
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
|
||||
|
||||
endline() {
|
||||
tee <<-EOF
|
||||
|
||||
BIN
pandaura.gif
Normal file
BIN
pandaura.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 940 KiB |
@@ -1 +1 @@
|
||||
fuuuu
|
||||
fuuuu ---- Childish comment
|
||||
Reference in New Issue
Block a user