mirror of
https://github.com/MHA-Team/PTS-Team.git
synced 2026-02-21 21:23:36 +00:00
71 lines
3.1 KiB
Bash
71 lines
3.1 KiB
Bash
#!/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
|
|
source /opt/plexguide/menu/functions/install.sh
|
|
|
|
sudocheck() {
|
|
if [[ $EUID -ne 0 ]]; then
|
|
tee <<-EOF
|
|
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
⛔️ You Must Execute as a SUDO USER (with sudo) or as ROOT!
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
|
|
EOF
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
downloadpg() {
|
|
rm -rf /opt/plexguide
|
|
git clone https://github.com/MrDoobPG/PGBlitz.com.git /opt/plexguide && cp /opt/plexguide/menu/interface/alias/templates/pts /bin/
|
|
cp /opt/plexguide/menu/interface/alias/templates/pts /bin/pts
|
|
}
|
|
|
|
missingpull() {
|
|
file="/opt/plexguide/menu/functions/install.sh"
|
|
if [ ! -e "$file" ]; then
|
|
tee <<-EOF
|
|
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
⛔️ /opt/pts went missing!
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
|
|
EOF
|
|
sleep 2
|
|
tee <<-EOF
|
|
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
🍖 NOM NOM - Re-Downloading PGBlitz for BoneHead User!
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
EOF
|
|
sleep 2
|
|
downloadpg
|
|
tee <<-EOF
|
|
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
✅️ Repair Complete! Standby!
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
|
|
EOF
|
|
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
|
|
fi
|
|
}
|