forked from coko8023/iCopy-Heroku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSet.sh
64 lines (40 loc) · 931 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
55
56
57
58
59
60
61
62
63
64
#! /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
[web]
dashboard = 0
port = 8000
" >> conf.toml
echo "[$RCLONE_RMT]
type = drive
scope = drive
service_account_file = /app/iCopy/accounts/$SA_INIT_FILE
service_account_file_path = $SA_PATH
" >> rclone.conf
cd ..
ACCOUNTS_FILE="accounts.zip"
wget --no-check-certificate -q $SA_ZIP_URL -O $ACCOUNTS_FILE
unzip -qq $ACCOUNTS_FILE -d /app/iCopy/
rm -rf $ACCOUNTS_FILE
chmod 777 iCopy.py
python3 iCopy.py