-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathFN_extend.js
35 lines (35 loc) · 1.24 KB
/
FN_extend.js
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
// @grant nodejs
console.log('⏳ 初始化安装依赖中......');
$exec('wget https://raw.githubusercontent.com/Oreomeow/freenom-py/main/requirements.txt -O requirements.txt && pip3 install -r requirements.txt', {
cwd: './script/Shell',
timeout: 0,
cb(data, error) {
error ? console.error(error) : console.log(data);
},
});
console.log('⏳ 开始拉取 git 仓库 Oreomeow/freenom-py');
$exec('git clone https://github.com/Oreomeow/freenom-py.git', {
cwd: './script/Shell',
timeout: 0,
cb(data, error) {
error ? console.error(error) : console.log(data);
},
});
console.log('⏳ 开始执行 FN_extend.py');
$exec('python3 FN_extend.py', {
cwd: './script/Shell/freenom-py',
timeout: 0,
env: {
FN_ID: $store.get('FN_ID', 'string'),
FN_PW: $store.get('FN_PW', 'string'),
MAIL_USER: $store.get('MAIL_USER', 'string'),
MAIL_ADDRESS: $store.get('MAIL_ADDRESS', 'string'),
MAIL_PW: $store.get('MAIL_PW', 'string'),
MAIL_HOST: $store.get('MAIL_HOST', 'string'),
MAIL_PORT: $store.get('MAIL_PORT', 'string'),
MAIL_TO: $store.get('MAIL_TO', 'string'),
},
cb(data, error) {
error ? console.error(error) : console.log(data);
},
});