forked from f0rx4/FClone-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Set.sh
54 lines (35 loc) · 900 Bytes
/
Set.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#! /bin/bash
cd ./iCopy/config
echo "[tg]
"token = "\"$BOT_TOKEN\"
"usr_id = "\"$USER_ID\"
[database]
"db_connect_method = "\"$DB_CONNECT_METHOD\"
"db_addr = "\"$DB_ADDRESS\"
"db_port = "$DB_PORT""
"db_name = "\"$DB_NAME\"
"db_user = "\"$DB_USERNAME\"
"db_passwd = "\"$DB_PASS\"
[general]
"language = "\"$LANGUAGE\"
"cloner = "\"$CLONER\"
"option = "\"$OPTION\"
"remote = "\"$RCLONE_RMT\"
"parallel_c = "\"$PARALLEL_CHECKERS\"
"parallel_t = "\"$PARALLEL_TRANSFERS\"
"min_sleep = "\"$MIN_SLEEP\"
"sa_path = "\"$SA_PATH\"
run_args = $RUN_ARGS
" >> conf.toml
echo "[$RCLONE_RMT]
type = drive
scope = drive
"service_account_file = /app/iCopy/accounts/$SA_INIT_FILE"
"service_account_file_path = $SA_PATH"
"team_drive = $FOLDER_ID"
" >> rclone.conf
cd ..
wget --no-check-certificate -q $SA_ZIP_URL -O accounts.zip
unzip -qq accounts.zip -d /app/iCopy/
chmod 777 Bot.py
python3 Bot.py