#!/bin/bash # # Title: PGBlitz (Reference Title File) # Author(s): Admin9705 - Deiteq - Sub7Seven # URL: https://pgblitz.com - http://github.pgblitz.com # GNU: General Public License v3.0 ################################################################################ # Upgrade apt-get update -y # apt-get upgrade -y # causes problems when you forced on an interactive screen apt-get install software-properties-common git zip unzip dialog -y tee <<-EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🌎 INSTALLING: PGBlitz Notice ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ By Installing PGBlitz, you are agreeing to the terms and conditions of the GNUv3 Project License! Please Standby... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF sleep 3 # Delete If it Exist for Cloning file="/opt/plexguide" if [ -e "$file" ]; then rm -rf /opt/plexguide; fi file="/opt/pgstage" if [ -e "$file" ]; then rm -rf /opt/pgstage; fi rm -rf /opt/pgstage/place.holder 1>/dev/null 2>&1 git clone -b v8.5 --single-branch https://github.com/PGBlitz/Install.git /opt/pgstage mkdir -p /var/plexguide/logs echo "" >/var/plexguide/server.ports echo "51" >/var/plexguide/pg.pythonstart touch /var/plexguide/pg.pythonstart.stored start=$(cat /var/plexguide/pg.pythonstart) stored=$(cat /var/plexguide/pg.pythonstart.stored) if [ "$start" != "$stored" ]; then bash /opt/pgstage/pyansible.sh fi echo "51" >/var/plexguide/pg.pythonstart.stored ansible-playbook /opt/pgstage/clone.yml cp /opt/plexguide/menu/alias/templates/plexguide /bin/plexguide cp /opt/plexguide/menu/alias/templates/pgblitz /bin/pgblitz cp /opt/plexguide/menu/alias/templates/plexguide /bin/pg tee <<-EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⌛ Verifiying PGBlitz / PGBlitz Installed @ /bin/plexguide - Standby! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF sleep 2 file="/bin/plexguide" if [ ! -e "$file" ]; then tee <<-EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⛔️ WARNING! Installed Failed! PGBlitz / PGBlitz Command Missing! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Please Reinstall PGBlitz by running the Command Again! We are doing this to ensure that your installation continues to work! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF exit fi tee <<-EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✅️ PASSED! The PGBlitz Commands Installed! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF rm -rf /var/plexguide/new.install 1>/dev/null 2>&1 sleep 2 chmod 775 /bin/plexguide chown 1000:1000 /bin/plexguide chmod 775 /bin/pgblitz chown 1000:1000 /bin/pgblitz chmod 775 /bin/pg chown 1000:1000 /bin/pg ## Other Folders mkdir -p /opt/appdata/plexguide mkdir -p /var/plexguide tee <<-EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ↘️ Start AnyTime By Typing >>> pg [or] pgblitz ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF