Skip to content

Commit

Permalink
11
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Aug 11, 2019
1 parent 8169762 commit c5bf18e
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 37 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

18 changes: 9 additions & 9 deletions menu/functions/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ updateprime() {
if [ ! -e "$file" ]; then newinstall; fi

ospgdistro=$(lsb_release -is)
ospgrelease=$(lsb_release -rs)
if [ "$ospgdistro" = "debian" ] && [ "$ospgrelease" = "9" ] || [ "$ospgrelease" = "10" ]; then
echo "debian" >${abc}/os.version
else echo "ubuntu" >${abc}/os.version; fi
ospgrelease=$(lsb_release -sr | cut -d. -f1)
if [[ "$ospgdistro" = "Debian" ]] && [[ "$ospgrelease" = "9" ]] || [[ "$ospgrelease" = "10" ]]; then
echo "Debian" >${abc}/os.version
else echo "Ubuntu" >${abc}/os.version; fi

echo "3" >${abc}/pg.mergerinstall
echo "52" >${abc}/pg.pythonstart
Expand Down Expand Up @@ -167,7 +167,7 @@ emergency() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ Emergency & Warning Log Generator
⛔️ Emergency & Warning Log Generator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: This can be turned [On] or Off in Settings!
Expand Down Expand Up @@ -303,10 +303,10 @@ localspace() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ User Interface Installed / Updated
↘️ User Interface Installed / Updated
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INFORMATION: UI is a simple interface that provides information,
INFORMATION: PGUI is a simple interface that provides information,
warnings, and stats that will assist both yourself and tech support!
To turn this off, goto settings and turn off/on the PG User Interface!
Expand Down Expand Up @@ -462,7 +462,7 @@ serverid() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↘️ Establishing Server ID 💬 Use One Word & Keep it Simple
↘️ Establishing Server ID 💬 Use One Word & Keep it Simple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '🌏 TYPE Server ID | Press [ENTER]: ' typed </dev/tty
Expand Down Expand Up @@ -502,7 +502,7 @@ watchtower() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 WatchTower Edition
📂 PG WatchTower Edition
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 WatchTower updates your containers soon as possible!
Expand Down
6 changes: 5 additions & 1 deletion menu/pgbox/pgbox_corepersonal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
shell: 'cat /var/plexguide/boxcore.user'
register: boxuser

- name: Register Repo
shell: 'cat /var/plexguide/boxrepo.repo'
register: boxrepo

- name: Register Branch
shell: 'cat /var/plexguide/boxcore.branch'
register: boxbranch

- name: 'Cloning {{boxuser.stdout}} Core Apps'
git:
repo: 'https://github.com/{{boxuser.stdout}}/Apps-Core'
repo: 'https://github.com/{{boxuser.stdout}}/{{boxrepo.repo}}'
dest: '/opt/coreapps'
version: '{{boxbranch.stdout}}'
force: yes
21 changes: 14 additions & 7 deletions menu/pgbox/pgboxcore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 PGBox ~ Multi-App Installer 📓 Reference: pgbox.pgblitz.com
🚀 PGBox ~ Multi-App Installer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 Potential Apps to Install
Expand Down Expand Up @@ -245,15 +245,19 @@ EOF
pinterface() {

boxuser=$(cat /var/plexguide/boxcore.user)
boxbrepo=$(cat /var/plexguide/boxrepo.repo)
boxbranch=$(cat /var/plexguide/boxcore.branch)


tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 PG Core Box Edition! 📓 Reference: core.pgblitz.com
🚀 PG Core Box Edition!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 User: $boxuser | Branch: $boxbranch
💬 User: $boxuser
Repo: $boxrepo
Branch: $boxbranch
[1] Change User Name & Branch
[2] Deploy Core Box - Personal (Forked)
Expand All @@ -280,13 +284,15 @@ Username & Branch 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/boxcore.user
echo "$boxrepo" >/var/plexguide/boxrepo.repo
echo "$boxbranch" >/var/plexguide/boxcore.branch
pinterface
;;
2)
existcheck=$(git ls-remote --exit-code -h "https://github.com/$boxuser/Apps-Core" | grep "$boxbranch")
existcheck=$(git ls-remote --exit-code -h "https://github.com/$boxuser/$boxrepo" | grep "$boxbranch")
if [ "$existcheck" == "" ]; then
echo
read -p '💬 Exiting! Forked Version Does Not Exist! | Press [ENTER]: ' typed </dev/tty
Expand All @@ -313,11 +319,11 @@ mainbanner() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 PG Core Box Edition! 📓 Reference: core.pgblitz.com
🚀 PG Core Box Edition!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 Core Box apps simplify their usage within PGBlitz! PG provides more
focused support and development based on core usage.
💬 ´Core Box apps simplify their usage within PGBlitz!
PG provides more focused support and development based on core usage.
💬 The Personal Forked option will install your version of Core Box. Good
for testing or for personal mods! Ensure that it exist prior to use!
Expand All @@ -341,6 +347,7 @@ EOF
;;
2)
variable /var/plexguide/boxcore.user "NOT-SET"
variable >/var/plexguide/boxrepo.repo "NOT-SET"
variable /var/plexguide/boxcore.branch "NOT-SET"
pinterface
;;
Expand Down
2 changes: 1 addition & 1 deletion menu/pgbox/pgboxselect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mainstart() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 PG Box Apps Interface Selection 📓 Reference: pgbox.pgblitz.com
🚀 PG Box Apps Interface Selection
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 PG Box installs a series of Core and Community applications!
Expand Down
11 changes: 6 additions & 5 deletions menu/pgui/localspace.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
# GNU: General Public License v3.0
################################################################################
[Unit]
Description='PGui Used space | localspace '
Description=Used space | localspace
After=multi-user.target

[Service]
Type=simple
User=0
Group=0
Type=simple
ExecStart=/bin/bash /opt/plexguide/menu/pgui/localspace.sh
TimeoutStopSec=20
KillMode=process
RemainAfterExit=20sec
TimeoutStopSec=20sec
RemainAfterExit=yes
Restart=always

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
49 changes: 38 additions & 11 deletions menu/pgui/mountcheck.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Title: mountcheck
# Moded : MrDoob | ptSComm
# Author(s): Admin9705 - Deiteq
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
Expand All @@ -13,13 +14,42 @@ diskspace27=0

while true; do

gdrivecheck=$(systemctl is-active gdrive)
gcryptcheck=$(systemctl is-active gcrypt)
tdrivecheck=$(systemctl is-active tdrive)
tcryptcheck=$(systemctl is-active tcrypt)
pgunioncheck=$(systemctl is-active pgunion)
pgblitzcheck=$(systemctl is-active pgblitz)

gdrivecheck=$(systemctl is-active gdrive)
gcryptcheck=$(systemctl is-active gcrypt)
tdrivecheck=$(systemctl is-active tdrive)
tcryptcheck=$(systemctl is-active tcrypt)
pgunioncheck=$(systemctl is-active pgunion)

pgblitzcheck=$(systemctl is-active pgblitz)
pgbmovecheck=$(systemctl is-active pgmove)

pgblitz=$(sudo systemctl list-unit-files | grep pgblitz.service | awk '{ print $2 }')
pgmove=$(sudo systemctl list-unit-files | grep pgmove.service | awk '{ print $2 }')

touch /var/plexguide/status.mounts
rm -rf "$status"
status=$(tail -n1 /var/plexguide/status.mounts)

if [[ "$pgmove" == "enabled" ]]; then
echo "1" >> /var/plexguide/status.mounts
else [[ "pgblitz" == "enabled" ]]
echo "2" >> /var/plexguide/status.mounts
fi

if [[ $status == "1" ]] ; then
if [[ "$pgmovecheck" != "active" ]]; then
echo "🔴 Not Operational" >/var/plexguide/pg.blitz;
else [[ "$pgmovecheck" != "active" ]]
echo "✅ Operational" >/var/plexguide/pg.blitz;
fi
fi
if [[ $status == "2" ]] ; then
if [[ "$pgblitzcheck" != "active" ]]; then
echo "🔴 Not Operational" >/var/plexguide/pg.blitz;
else [[ "$pgblitzcheck" != "active" ]];
echo "✅ Operational" >/var/plexguide/pg.blitz;
fi
fi
# Todo remove the dupes or change to crypt once PGUI is updated

if [[ "$gdrivecheck" != "active" ]]; then
Expand All @@ -42,9 +72,6 @@ while true; do
echo "🔴 Not Operational " >/var/plexguide/pg.union
else echo "✅ Operational " >/var/plexguide/pg.union; fi

if [[ "$pgblitzcheck" != "active" ]]; then
echo "🔴 Not Operational " >/var/plexguide/pg.blitz
else echo "✅ Operational " >/var/plexguide/pg.blitz; fi

# Disk Calculations - 5000000 = 5GB

Expand Down
2 changes: 1 addition & 1 deletion menu/plex/plex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ question1() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌎 PG - PGBlitz Installer ~ http://plex.pgblitz.com
🌎 PLex Installler
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: DO NOT SELECT LOCAL SYSTEM for a REMOTE SERVER outside of your
network as in using Hetzner, Google GCE, WholeSale Internet & Etc! If you
Expand Down

0 comments on commit c5bf18e

Please sign in to comment.