From 0c021c1d16cc73c49d1c2dbe9e704c60b0f47445 Mon Sep 17 00:00:00 2001 From: MrDoobPG <46342172+MrDoobPG@users.noreply.github.com> Date: Tue, 10 Sep 2019 21:06:02 +0200 Subject: [PATCH 1/3] Update start.sh --- menu/start/start.sh | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/menu/start/start.sh b/menu/start/start.sh index 13b26dba..49938cc7 100644 --- a/menu/start/start.sh +++ b/menu/start/start.sh @@ -62,8 +62,8 @@ varstart() { file="/opt/appdata/plexguide" if [ ! -e "$file" ]; then mkdir -p /opt/appdata/plexguide 1>/dev/null 2>&1 - chown 0775 /opt/appdata/plexguide 1>/dev/null 2>&1 - chmod 1000:1000 /opt/appdata/plexguide 1>/dev/null 2>&1 + chown -R 0775 /opt/appdata/plexguide 1>/dev/null 2>&1 + chmod -R 1000:1000 /opt/appdata/plexguide 1>/dev/null 2>&1 fi ###################### FOR VARIABLS ROLE SO DOESNT CREATE RED - START @@ -116,7 +116,9 @@ varstart() { ansible --version | head -n +1 | awk '{print $2'} >/var/plexguide/pg.ansible docker --version | head -n +1 | awk '{print $3'} | sed 's/,$//' >/var/plexguide/pg.docker - cat /etc/os-release | head -n +5 | tail -n +5 | cut -d'"' -f2 >/var/plexguide/pg.os + lsb_release -si >/var/plexguide/pg.os + + ## stupid line cat /etc/os-release | head -n +5 | tail -n +5 | cut -d'"' -f2 >/var/plexguide/pg.os file="/var/plexguide/gce.false" if [ -e "$file" ]; then echo "No" >/var/plexguide/pg.gce; else echo "Yes" >/var/plexguide/pg.gce; fi @@ -148,9 +150,9 @@ varstart() { if [ ! -e "$file" ]; then echo "/opt/appdata/plexguide" >/var/plexguide/data.location; fi space=$(cat /var/plexguide/data.location) - used=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $3}') - capacity=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $2}') - percentage=$(df -h /opt/appdata/plexguide | tail -n +2 | awk '{print $5}') + used=$(df -h /opt/ | tail -n +2 | awk '{print $3}') + capacity=$(df -h /opt/ | tail -n +2 | awk '{print $4}') + percentage=$(df -h /opt/ | tail -n +2 | awk '{print $5}') # For the PGBlitz UI echo "$used" >/var/plexguide/pg.used @@ -167,26 +169,26 @@ menuprime() { 🌎 $transport | Version: $pgnumber | ID: $serverid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -🌵 PG Disk Used Space: $used of $capacity | $percentage Used Capacity +🌵 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 | tail -n +2 | awk '{print $3}') - capacity_gce=$(df -h /mnt | tail -n +2 | awk '{print $2}') - percentage_gce=$(df -h /mnt | tail -n +2 | awk '{print $5}') - echo " GCE Disk Used Space: $used_gce of $capacity_gce | $percentage_gce Used Capacity" + 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" | tail -n +2 | awk '{print $3}') - capacity_gce2=$(df -h "$disktwo" | tail -n +2 | awk '{print $2}') - percentage_gce2=$(df -h "$disktwo" | tail -n +2 | awk '{print $5}') + 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" + echo " 2nd Disk Used Space: $used_gce2 of $capacity_gce2 | $percentage_gce2 Used Capacity" fi fi From 84f2e488c15aa55dc3b7b20fc331652d962e57b2 Mon Sep 17 00:00:00 2001 From: MrDoobPG <46342172+MrDoobPG@users.noreply.github.com> Date: Tue, 10 Sep 2019 21:08:21 +0200 Subject: [PATCH 2/3] Create place.holder --- place.holder | 1 + 1 file changed, 1 insertion(+) create mode 100644 place.holder diff --git a/place.holder b/place.holder new file mode 100644 index 00000000..06dac8ff --- /dev/null +++ b/place.holder @@ -0,0 +1 @@ +Fuuuuuu From 7dad1f1d9e81e9520915c3bd5a2c3599ef5ee160 Mon Sep 17 00:00:00 2001 From: MrDoobPG <46342172+MrDoobPG@users.noreply.github.com> Date: Tue, 10 Sep 2019 21:31:24 +0200 Subject: [PATCH 3/3] Update start.sh --- menu/functions/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu/functions/start.sh b/menu/functions/start.sh index 2bcb0079..36936f6f 100644 --- a/menu/functions/start.sh +++ b/menu/functions/start.sh @@ -33,7 +33,7 @@ missingpull() { tee <<-EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -⛔️ /opt/plexguide went missing! +⛔️ Base folder went missing! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF @@ -41,7 +41,7 @@ EOF tee <<-EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - 🍖 NOM NOM - Re-Downloading PGBlitz for BoneHead User! + 🍖 NOM NOM - Re-Downloading PTS for BoneHead User! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF sleep 2