Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Sep 11, 2019
2 parents 6fe6fd6 + 7dad1f1 commit 1a8833c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
4 changes: 2 additions & 2 deletions menu/functions/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ missingpull() {
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⛔️ /opt/plexguide went missing!
⛔️ Base folder went missing!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🍖 NOM NOM - Re-Downloading PGBlitz for BoneHead User!
🍖 NOM NOM - Re-Downloading PTS for BoneHead User!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
sleep 2
Expand Down
32 changes: 17 additions & 15 deletions menu/start/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions place.holder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fuuuuuu

0 comments on commit 1a8833c

Please sign in to comment.