forked from PGBlitz/PGClone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloneclean.sh
35 lines (27 loc) · 1.65 KB
/
cloneclean.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
cloneclean () {
pgclonevars
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Clone Clean
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Clone Clean deletes garbage files in your downloads folder per every
[$cloneclean] minutes!
TORRENT USERS: Recommend that you set this number higher! If seeding,
Clone Clean will destory the seed files. Please set this number to a high
number of minutes. (IE - 1440 minutes = 1 day | 14440 minutes = 10 days)
WARNING: Do not set this too low because legitmate files!
Quitting? Type >>> exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '↘️ Type Minutes (Minimum is 120) | PRESS [ENTER]: ' varinput < /dev/tty
if [[ "$varinput" == "exit" || "$varinput" == "Exit" || "$varinput" == "EXIT" ]]; then clonestart; fi
if [[ "$varinput" -lt "120" ]]; then cloneclean; fi
echo "$varinput" > /var/plexguide/cloneclean
}