Skip to content

Commit

Permalink
Update gtused.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Dec 2, 2019
1 parent 5deaec4 commit 511d1ce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions menu/pgui/templates/gtused.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ log="/var/plexguide"
useragent="$(cat /var/plexguide/uagent)"

#if else loop for checking what is running
rm -f $log/gdcrypt.log && touch $log/gdcrypt.log
rm -f $log/tdcrypt.log && touch $log/tdcrypt.log
rm -f $log/gduncrypt.log && touch $log/gduncrypt.log
rm -f $log/tduncrypt.log && touch $log/tduncrypt.log

if grep -q "gdrive:" $config; then
rm -f $log/gduncrypt.log && touch $log/gduncrypt.log
rclone size gdrive: \
--verbose=1 \
--fast-list \
Expand All @@ -21,14 +24,13 @@ if grep -q "gdrive:" $config; then
--user-agent="$useragent" \
--timeout=30m \
--exclude="**encrypt**" \
--config /opt/appdata/plexguide/rclone.conf | awk '{print $3,$4}' >>$log/gduncrypt.log
--config /opt/appdata/plexguide/rclone.conf | awk '{print $3,$4}' >$log/gduncrypt.log
sed -i 's/Total size: / /g' $log/gduncrypt.log
else echo "🔴 NOT DEPLOYED" $log/gduncrypt.log; fi

sleep 2

if grep -q "tdrive:" $config; then
rm -f $log/tduncrypt.log && touch $log/tduncrypt.log
rclone size tdrive: \
--verbose=1 \
--fast-list \
Expand All @@ -37,36 +39,34 @@ if grep -q "tdrive:" $config; then
--user-agent="$useragent" \
--timeout=30m \
--exclude="**encrypt**" \
--config /opt/appdata/plexguide/rclone.conf | awk '{print $3,$4}' >>$log/tduncrypt.log
--config /opt/appdata/plexguide/rclone.conf | awk '{print $3,$4}' >$log/tduncrypt.log
sed -i 's/Total size: / /g' $log/tduncrypt.log
else echo "🔴 NOT DEPLOYED" $log/tduncrypt.log; fi

sleep 2

if grep -q "gcrypt:" $config; then
rm -f $log/gdcrypt.log && touch $log/gdcrypt.log
rclone size gcrypt: \
--verbose=1 \
--fast-list \
--retries 3 \
--user-agent="$useragent" \
--no-update-modtime \
--timeout=30m \
--config /opt/appdata/plexguide/rclone.conf | awk '{print $3,$4}' >>$log/gdcrypt.log
--config /opt/appdata/plexguide/rclone.conf | awk '{print $3,$4}' >$log/gdcrypt.log
sed -i 's/Total size: / /g' $log/gdcrypt.log
else echo "🔴 NOT DEPLOYED" $log/gdcrypt.log; fi

sleep 2

if grep -q "tcrypt:" $config; then
rm -f $log/tdcrypt.log && touch $log/tdcrypt.log
rclone size tcrypt: \
--verbose=1 \
--fast-list \
--retries 3 \
--user-agent="$useragent" \
--no-update-modtime \
--timeout=30m \
--config /opt/appdata/plexguide/rclone.conf | awk '{print $3,$4}' >>$log/tdcrypt.log
--config /opt/appdata/plexguide/rclone.conf | awk '{print $3,$4}' >$log/tdcrypt.log
sed -i 's/Total size: / /g' $log/tdcrypt.log
else echo "🔴 NOT DEPLOYED" $log/tdcrypt.log; fi

0 comments on commit 511d1ce

Please sign in to comment.