diff --git a/menu/hetzner/pghetznerigpu.sh b/menu/hetzner/pghetznerigpu.sh deleted file mode 100644 index caa03a7b..00000000 --- a/menu/hetzner/pghetznerigpu.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash -# -# Title: PGBlitz (Hetzner iGPU / GPU) -# Author(s): Admin9705 - Deiteq - Sub7Seven -# Coder : MrDoob | Freelaancer Coder TechLead -# URL: https://pgblitz.com - http://github.pgblitz.com -# GNU: General Public License v3.0 -################################################################################ - -tee <<-EOF - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ⌛ Verifiying PG Hetzner iGPU / GPU HW-Transcode ! - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -EOF -echo "Updating packages" -apt-get update -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "Upgrading packages" -apt-get upgrade -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "Dist-Upgrading packages" -apt-get dist-upgrade -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "Autoremove old Updates" -apt-get autoremove -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "install vainfo" -sudo apt-get install vainfo -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -apt-get install lsb-release -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "install complete" - -tee <<-EOF - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - 🚀 PG Hetzner iGPU / GPU HW-Transcode - - NOTE : You MUST have Plex Pass to enable hardware transcoding in the Plex server - - Your Operations System : $(lsb_release -sd) - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - [1] Ubuntu 16.04 LTS - [2] Ubuntu 18.04 LTS - [3] Debian 9.6 - - [4] iGPU / GPU TEST - - [Z] Exit - - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - -EOF - -# Standby -read -p 'Type a Number | Press [ENTER]: ' typed &1 >>/dev/null - export DEBIAN_FRONTEND=noninteractive - sleep 10 -elif [ "$typed" == "Z" ] || [ "$typed" == "z" ]; then - exit -else - bash /opt/plexguide/menu/tools/tools.sh - exit -fi - -bash /opt/plexguide/menu/tools/tools.sh -exit diff --git a/menu/network/network.sh b/menu/network/network.sh deleted file mode 100644 index c68acc91..00000000 --- a/menu/network/network.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# -# Title: PGBlitz (Reference Title File) -# Author(s): Admin9705 - Deiteq -# URL: https://pgblitz.com - http://github.pgblitz.com -# GNU: General Public License v3.0 -################################################################################ -source /opt/plexguide/menu/functions/functions.sh -# Menu Interface -question1() { - tee <<-EOF - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -📂 System & Network Auditor -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - -[1] System & Network Benchmark - Basic -[2] System & Network Benchmark - Advanced -[3] Simple SpeedTest - -[Z] Exit - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - -EOF - - # Standby - read -p 'Type a Number | Press [ENTER]: ' typed &1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "Upgrading packages" -apt-get upgrade -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "Dist-Upgrading packages" -apt-get dist-upgrade -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "Autoremove old Updates" -apt-get autoremove -yqq 2>&1 >>/dev/null -export DEBIAN_FRONTEND=noninteractive -echo "install complete" - -tee <<-EOF - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -🚀 System Tweaker -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -💬 System Tweaker - -[1] Network Tweaker ( Debian 9 & Ubuntu 18 only ) -[2] Docker Swapness -[3] PTS logrotator -[4] VnStat autoinstaller - -[Z] Exit - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -EOF - -# Standby -read -p 'Type a Number | Press [ENTER]: ' typed &1 >>/dev/null - export DEBIAN_FRONTEND=noninteractive - echo "networktools installed" - sleep 2 - network=$(ifconfig | grep -E 'eno1|enp|ens5' | awk '{print $1}' | sed -e 's/://g') - sleep 2 - echo $network "network detected" - ethtool -K $network tso off tx off - sed -i '$a\' /etc/crontab - sed -i '$a\#################################' /etc/crontab - sed -i '$a\## PTS Network tweak ' /etc/crontab - sed -i '$a\#################################' /etc/crontab - sed -i '$a\@reboot ethtool -K '$network' tso off tx off\' /etc/crontab - sleep 2 - echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - echo "" - echo " ✅ PASSED ! Network Tweak done" - echo " ✅ PASSED ! crontab line added" - echo "" - echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && sleep 10 - -elif [ "$typed" == "2" ]; then - sudo sysctl vm.swappiness=0 - sudo sysctl vm.overcommit_memory=1 - sed -i '$a\' /etc/sysctl.conf - sed -i '$a\' /etc/sysctl.conf - sed -i '$a\#########################################' /etc/sysctl.conf - sed -i '$a\## Docker PG Swapness changes ' /etc/sysctl.conf - sed -i '$a\#########################################' /etc/sysctl.conf - sed -i '$a\vm.swappiness=0\' /etc/sysctl.conf - sed -i '$a\vm.overcommit_memory=1\' /etc/sysctl.conf - sleep 2 - echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - echo "" - echo " ✅ PASSED ! Docker swappiness offline" - echo " ✅ PASSED ! systctl edit" - echo "" - echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && sleep 10 - -elif [ "$typed" == "3" ]; then - username=$(grep "1000" /etc/passwd | cut -d: -f1 | awk '{print $1}') - - sed -i '/#compress/s/^#*//g' /etc/logrotate.conf - sed -i 's/weekly/daily/g' /etc/logrotate.conf - sed -i 's/rotate 4/rotate 1/g' /etc/logrotate.conf - - sleep 2 - - sed -i '$a\ ' /etc/logrotate.conf - sed -i '$a\########################################' /etc/logrotate.conf - sed -i '$a\## PGBlitz Upload logrotate ' /etc/logrotate.conf - sed -i '$a\########################################' /etc/logrotate.conf - sed -i '$a\ ' /etc/logrotate.conf - sed -i '$a\/var/plexguide/logs/*.log {' /etc/logrotate.conf - sed -i '$a\ su '$username' '$username' ' /etc/logrotate.conf - sed -i '$a\ rotate 7' /etc/logrotate.conf - sed -i '$a\ daily' /etc/logrotate.conf - sed -i '$a\ compress' /etc/logrotate.conf - sed -i '$a\ missingok' /etc/logrotate.conf - sed -i '$a\ notifempty' /etc/logrotate.conf - sed -i '$a\ maxage 7' /etc/logrotate.conf - sed -i '$a\ create 755 '$username' '$username'' /etc/logrotate.conf - sed -i '$a\}' /etc/logrotate.conf - sed -i '$a\ ' /etc/logrotate.conf - sed -i '$a\######################################' /etc/logrotate.conf - sed -i '$a\## PGBlitz Upload logrotate ' /etc/logrotate.conf - sed -i '$a\######################################' /etc/logrotate.conf - sleep 2 - echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - echo "" - echo " ✅ PASSED ! PGBlitz logrotate installed" - echo " ✅ PASSED ! Daily backup from the logs" - echo " ✅ PASSED ! max age 7 Days " - echo " ✅ PASSED ! auto delete older logs" - echo "" - echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && sleep 10 - -elif [ "$typed" == "4" ]; then - echo "networktools | vnstat | vnstati install | please wait" - apt-get install ethtool vnstat vnstati -yqq 2>&1 >>/dev/null - export DEBIAN_FRONTEND=noninteractive - echo "networktools | vnstat | vnstati installed" - sleep 2 - network=$(ifconfig | grep -E 'eno1|enp|ens5' | awk '{print $1}' | sed -e 's/://g') - sleep 2 - echo $network "network detected" - sed -i 's/eth0/'$network'/g' /etc/vnstat.conf - sed -i 's/UnitMode 0/UnitMode 1/g' /etc/vnstat.conf - sed -i 's/RateUnit 1/RateUnit 0/g' /etc/vnstat.conf - sed -i 's/Locale "-"/Locale "LC_ALL=en_US.UTF-8"/g' /etc/vnstat.conf - sleep 2 - /etc/init.d/vnstat restart 2>&1 >>/dev/null - sleep 2 - echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - echo "" - echo " ✅ PASSED ! vnstat installed" - echo " ✅ PASSED ! vnstat -l [ live traffic ]" - echo " ✅ PASSED ! vnstat -d [ daily traffic ]" - echo " ✅ PASSED ! vnstat -w [ weekly traffic ]" - echo " ✅ PASSED ! vnstat -m [ month traffic ]" - echo "" - echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && sleep 10 - -elif [ "$typed" == "Z" ] || [ "$typed" == "z" ]; then - exit -else - bash /opt/plexguide/menu/tools/tools.sh - exit -fi -bash /opt/plexguide/menu/tools/tools.sh -exit diff --git a/menu/pg.yml b/menu/pg.yml index 7f328b1c..c1bec586 100644 --- a/menu/pg.yml +++ b/menu/pg.yml @@ -12,4 +12,5 @@ - { role: clean-encrypt, tags: ['clean-encrypt'] } - { role: kernel, tags: ['kernel'] } - { role: nvidia, tags: ['nvidia'] } - - { role: system, tags: ['system'] } \ No newline at end of file + - { role: system, tags: ['system'] } + - { role: plex, tags: ['plex'] } \ No newline at end of file diff --git a/menu/roles/plex/tasks/main.yml b/menu/roles/plex/tasks/main.yml new file mode 100644 index 00000000..fe01fbfb --- /dev/null +++ b/menu/roles/plex/tasks/main.yml @@ -0,0 +1,14 @@ +######################################################################### +# Title: Cloudbox: Plex Role # +# Author(s): l3uddz, desimaniac # +# URL: https://github.com/cloudbox/cloudbox # +# Docker Image: cloudb0x/plex # +# -- # +# Part of the Cloudbox project: https://cloudbox.works # +######################################################################### +# GNU General Public License v3.0 # +######################################################################### +--- +- name: Extra Tasks + import_tasks: "subtasks/extra.yml" + when: (not continuous_integration) diff --git a/menu/roles/plex/tasks/subtasks/claim_server.yml b/menu/roles/plex/tasks/subtasks/claim_server.yml new file mode 100644 index 00000000..1cc8886c --- /dev/null +++ b/menu/roles/plex/tasks/subtasks/claim_server.yml @@ -0,0 +1,52 @@ +########################################################################## +# Title: Cloudbox: Plex | Claim Server # +# Author(s): desimaniac # +# URL: https://github.com/cloudbox/cloudbox # +# -- # +# Part of the Cloudbox project: https://cloudbox.works # +########################################################################## +# GNU General Public License v3.0 # +########################################################################## +--- +- name: Get Plex Media Server claim code via API + block: + + - name: "Get Plex Media Server claim code" + uri: + url: https://plex.tv/api/claim/token.json + user: "{{ plex.user }}" + password: "{{ plex.pass }}" + force_basic_auth: yes + register: plex_claim + + - name: "Set 'plex_claim_code' variable" + set_fact: + plex_claim_code: "{{ plex_claim.json.token }}" + + when: (plex_account_enabled) + +- name: Get Plex Media Server claim code via prompts + block: + + - name: "Ask user for Plex Media Server claim code" + pause: + prompt: "Please visit 'https://plex.tv/claim', login with your Plex account, + copy the 'Claim Code', paste it below, and press ENTER." + register: plex_claim_code_prompt + + - name: "Set 'plex_claim_code' variable" + set_fact: + plex_claim_code: "{{ plex_claim_code_prompt.user_input }}" + + when: (not plex_account_enabled) + +- name: Assert Plex Media Server claim code exists + assert: + that: + - "plex_claim_code is defined" + - "plex_claim_code is not none" + - "plex_claim_code | trim | length > 0" + +- name: "Display Plex Media Server claim code" + debug: + msg: "Using Plex Claim Code{{ ':' }} {{ plex_claim_code }}" diff --git a/menu/roles/plex/tasks/subtasks/extra.yml b/menu/roles/plex/tasks/subtasks/extra.yml new file mode 100644 index 00000000..a08c75eb --- /dev/null +++ b/menu/roles/plex/tasks/subtasks/extra.yml @@ -0,0 +1,32 @@ +########################################################################## +# Title: Cloudbox: Plex | Extra Tasks # +# Author(s): desimaniac # +# URL: https://github.com/cloudbox/cloudbox # +# -- # +# Part of the Cloudbox project: https://cloudbox.works # +########################################################################## +# GNU General Public License v3.0 # +########################################################################## +--- +- name: Wait for 'Preferences.xml' to be created by Plex + wait_for: + path: "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" + state: present + +- name: Wait for Plex DB to be created + wait_for: + path: "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" + state: present + +- name: Stop Plex Container + docker_container: + name: plex + state: stopped + +- name: "DB Cache Size Settings" + import_tasks: "subtasks/settings/db_cache_size.yml" + tags: plex_db_cache_size + +- name: "Forced Automatic Quality Settings" + import_tasks: "subtasks/settings/forced_quality.yml" + tags: plex_forced_quality diff --git a/menu/roles/plex/tasks/subtasks/settings/db_cache_size.yml b/menu/roles/plex/tasks/subtasks/settings/db_cache_size.yml new file mode 100644 index 00000000..25fe8546 --- /dev/null +++ b/menu/roles/plex/tasks/subtasks/settings/db_cache_size.yml @@ -0,0 +1,84 @@ +########################################################################## +# Title: Cloudbox: Plex | DB Cache Size Settings # +# Author(s): desimaniac # +# URL: https://github.com/cloudbox/cloudbox # +# -- # +# Part of the Cloudbox project: https://cloudbox.works # +########################################################################## +# GNU General Public License v3.0 # +########################################################################## +--- +- name: Wait for Plex DB to be created + wait_for: + path: "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" + state: present + timeout: 600 + +- name: Get Current Plex DB Cache Size + shell: | + sqlite3 "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" \ + "PRAGMA default_cache_size;" + args: + executable: /bin/bash + register: current_db_cache_size + +- name: Set 'default_db_cache_size' variable + set_fact: + default_db_cache_size: '2000' + +- name: Check if 'plex.db_cache_size' was specified + set_fact: + db_cache_size_is_specified: "{{ true if not ( + (plex.db_cache_size is undefined) + or + (plex.db_cache_size is none) + or + (plex.db_cache_size | trim | length == 0) + ) + else false }}" + +- name: Get Desired Plex DB Cache Size + set_fact: + desired_db_cache_size: "{{ default_db_cache_size + if ( (not db_cache_size_is_specified) or (plex.db_cache_size == 'default') ) + else ( (plex.db_cache_size) | regex_replace(',', '') | int ) }}" + +- name: Make Plex DB Edits + block: + + - name: Stop Plex Container + docker_container: + name: plex + state: stopped + when: ('plex_db_cache_size' in ansible_run_tags) + + - name: Display Desired Plex DB Cache Size + debug: + msg: "Desired Plex DB Cache Size is '{{ desired_db_cache_size }}'" + + - name: "Set Plex DB Cache Size" + shell: | + sqlite3 "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" \ + "PRAGMA default_cache_size = '{{ desired_db_cache_size | int }}';" + args: + executable: /bin/bash + + - name: Get New Plex DB Cache Size + shell: | + sqlite3 "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" \ + "PRAGMA default_cache_size;" + args: + executable: /bin/bash + register: new_db_cache_size + + - name: Display New Plex DB Cache Size + debug: + msg: "Plex DB cache size is now set to '{{ new_db_cache_size.stdout | int }}'." + + - name: Start Plex Container + docker_container: + name: plex + state: started + when: ('plex_db_cache_size' in ansible_run_tags) + + when: ( current_db_cache_size.stdout | int ) != ( desired_db_cache_size | regex_replace(',', '') | int ) diff --git a/menu/roles/plex/tasks/subtasks/settings/forced_quality.yml b/menu/roles/plex/tasks/subtasks/settings/forced_quality.yml new file mode 100644 index 00000000..182e1e87 --- /dev/null +++ b/menu/roles/plex/tasks/subtasks/settings/forced_quality.yml @@ -0,0 +1,54 @@ +########################################################################## +# Title: Cloudbox: Plex | Forced Automatic Quality Settings # +# Author(s): desimaniac # +# URL: https://github.com/cloudbox/cloudbox # +# -- # +# Part of the Cloudbox project: https://cloudbox.works # +########################################################################## +# GNU General Public License v3.0 # +########################################################################## +# Based on the work by Michael Zemsky (https://github.com/zmike808) # +########################################################################## +--- +- name: Install lxml pip module + pip: "name=lxml state=present" + +- name: Wait for 'Preferences.xml' to be created by Plex + wait_for: + path: "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" + state: present + +# 'forceAutoAdjustQuality' in Preferences.xml +# Forces clients to use automatic quality for media unless the quality is set higher than the quality of the video. + +- name: "Set 'forceAutoAdjustQuality' in 'Preferences.xml' to + '{{ (plex.force_auto_adjust_quality|default(false,true)) | ternary('Enabled','Disabled') }}'." + xml: + path: "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" + xpath: /Preferences + attribute: forceAutoAdjustQuality + value: "{{ (plex.force_auto_adjust_quality|default(false,true)) | ternary('1','0') }}" + state: present + register: x + ignore_errors: yes + +# 'AllowHighOutputBitrates' in Preferences.xml +# Forces transcode quality to upscale. But can cause high bandwidth usage for clients. + +- name: "Set 'AllowHighOutputBitrates' in 'Preferences.xml' to + '{{ (plex.force_high_output_bitrates|default(false,true)) | ternary('Enabled','Disabled') }}'." + xml: + path: "/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Preferences.xml" + xpath: /Preferences + attribute: AllowHighOutputBitrates + value: "{{ (plex.force_high_output_bitrates|default(false,true)) | ternary('1','0') }}" + state: present + register: y + ignore_errors: yes + +- name: Restart plex container + docker_container: + name: plex + state: started + restart: yes + when: ('plex_forced_quality' in ansible_run_tags) and (x.changed or y.changed) diff --git a/menu/tools/tools.sh b/menu/tools/tools.sh index 6ac227e7..f0c045c0 100644 --- a/menu/tools/tools.sh +++ b/menu/tools/tools.sh @@ -58,12 +58,6 @@ tee <<-EOF [1] Patrol [2] Trakt -[3] Hetzner iGPU / GPU HW-Transcode -[4] DNS changer -[5] System Tweak -[6] Personal VPN Service Installer -[7] System & Network Auditor -[8] TroubleShoot ~ PreInstaller [Z] Exit @@ -79,19 +73,6 @@ if [ "$typed" == "1" ]; then bash /opt/pgpatrol/pgpatrol.sh elif [ "$typed" == "2" ]; then bash /opt/plexguide/menu/pgtrakt/pgtrakt.sh -elif [ "$typed" == "3" ]; then - bash /opt/plexguide/menu/hetzner/pghetznerigpu.sh -elif [ "$typed" == "4" ]; then - bash /opt/plexguide/menu/pgdnsswitcher/pgdnschanger.sh -elif [ "$typed" == "5" ]; then - bash /opt/plexguide/menu/nttweak/nttweak.sh -elif [ "$typed" == "6" ]; then - echo 'vpnserver' >/var/plexguide/type.choice && bash /opt/plexguide/menu/core/scripts/main.sh -elif [ "$typed" == "7" ]; then - bash /opt/plexguide/menu/network/network.sh -elif [ "$typed" == "8" ]; then - bash /opt/plexguide/menu/tshoot/tshoot.sh -elif [ "$typed" == "Z" ] || [ "$typed" == "z" ]; then exit else bash /opt/plexguide/menu/tools/tools.sh diff --git a/menu/tshoot/tshoot.sh b/menu/tshoot/tshoot.sh deleted file mode 100644 index 08d80fdf..00000000 --- a/menu/tshoot/tshoot.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -# -# Title: PGBlitz (Reference Title File) -# Author(s): Admin9705 - Deiteq -# URL: https://pgblitz.com - http://github.pgblitz.com -# GNU: General Public License v3.0 -################################################################################ - -# Menu Interface -tee <<-EOF - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -🚥 TroubleShoot Interface -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - -[1] Pre-Installer: Force the Entire Process Again -[2] UnInstaller : Docker & Running Containers | Force Pre-Install -[3] UnInstaller : PGBlitz -Z - Exit - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -EOF - -# Standby -read -p 'Type a Number | Press [ENTER]: ' typed /var/plexguide/pg.preinstall.stored - echo "0" >/var/plexguide/pg.ansible.stored - echo "0" >/var/plexguide/pg.rclone.stored - echo "0" >/var/plexguide/pg.python.stored - echo "0" >/var/plexguide/pg.docker.stored - echo "0" >/var/plexguide/pg.docstart.stored - echo "0" >/var/plexguide/pg.watchtower.stored - echo "0" >/var/plexguide/pg.label.stored - echo "0" >/var/plexguide/pg.alias.stored - echo "0" >/var/plexguide/pg.dep.stored - - tee <<-EOF - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -✅️ WOOT WOOT - Process Complete! Exit & Restart PGBlitz Now! -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -EOF - sleep 5 - -elif [ "$typed" == "2" ]; then - tee <<-EOF - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -🍖 NOM NOM - Uninstalling Docker & Resetting the Variables! -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -EOF - sleep 3 - - rm -rf /etc/docker - apt-get purge docker-ce - rm -rf /var/lib/docker - rm -rf /var/plexguide/dep* - echo "0" >/var/plexguide/pg.preinstall.stored - echo "0" >/var/plexguide/pg.ansible.stored - echo "0" >/var/plexguide/pg.rclone.stored - echo "0" >/var/plexguide/pg.python.stored - echo "0" >/var/plexguide/pg.docstart.stored - echo "0" >/var/plexguide/pg.watchtower.stored - echo "0" >/var/plexguide/pg.label.stored - echo "0" >/var/plexguide/pg.alias.stored - echo "0" >/var/plexguide/pg.dep - - tee <<-EOF - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -✅️ WOOT WOOT - Process Complete! Exit & Restart PGBlitz Now! -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -EOF - sleep 5 -elif [ "$typed" == "3" ]; then - tee <<-EOF - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -🍖 NOM NOM - Starting the PTS UnInstaller -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -EOF - sleep 3 - - echo "uninstall" >/var/plexguide/type.choice && bash /opt/plexguide/menu/core/scripts/main.sh -elif [[ "$typed" == "Z" || "$typed" == "z" ]]; then - exit -else - bash /opt/plexguide/menu/tshoot/tshoot.sh - exit -fi - -bash /opt/plexguide/menu/tshoot/tshoot.sh -exit