fix problem in scripts
This commit is contained in:
parent
1327616635
commit
136f9290d9
|
@ -109,13 +109,13 @@ while [[ "${#YOUR_GOOGLE_TEAM_DRIVE_ID}" != 19 ]]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
cd ~ &&
|
cd ~ &&
|
||||||
sed -i "s/bot_token/$YOUR_BOT_TOKEN/g" ./gd-utils/config.js &&
|
sed -i "s/bot_token/$YOUR_BOT_TOKEN/g" ./gd-utils-cht/config.js &&
|
||||||
sed -i "s/your_tg_username/$YOUR_TELEGRAM_ID/g" ./gd-utils/config.js &&
|
sed -i "s/your_tg_username/$YOUR_TELEGRAM_ID/g" ./gd-utils-cht/config.js &&
|
||||||
sed -i "s/DEFAULT_TARGET = ''/DEFAULT_TARGET = '$YOUR_GOOGLE_TEAM_DRIVE_ID'/g" ./gd-utils/config.js
|
sed -i "s/DEFAULT_TARGET = ''/DEFAULT_TARGET = '$YOUR_GOOGLE_TEAM_DRIVE_ID'/g" ./gd-utils-cht/config.js
|
||||||
echo -e "\033[1;32m----------------------------------------------------------\033[0m"
|
echo -e "\033[1;32m----------------------------------------------------------\033[0m"
|
||||||
|
|
||||||
echo -e "\033[1;32m“进程守护程序pm2”开始安装......\033[0m"
|
echo -e "\033[1;32m“进程守护程序pm2”开始安装......\033[0m"
|
||||||
cd /root/gd-utils &&
|
cd /root/gd-utils-cht &&
|
||||||
npm i pm2 -g && pm2 l
|
npm i pm2 -g && pm2 l
|
||||||
echo -e "\033[1;32m启动守护进程......\033[0m"
|
echo -e "\033[1;32m启动守护进程......\033[0m"
|
||||||
pm2 start server.js --node-args="--max-old-space-size=4096"
|
pm2 start server.js --node-args="--max-old-space-size=4096"
|
||||||
|
@ -135,7 +135,6 @@ echo "server {
|
||||||
server_name $YOUR_DOMAIN_NAME;
|
server_name $YOUR_DOMAIN_NAME;
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
ssl on;
|
ssl on;
|
||||||
|
|
|
@ -106,12 +106,12 @@ $cmd_install install $cmd_install_rely -y
|
||||||
curl -sL $nodejs_curl | bash -
|
curl -sL $nodejs_curl | bash -
|
||||||
$cmd_install install nodejs -y
|
$cmd_install install nodejs -y
|
||||||
$cmd_install_rpm_build
|
$cmd_install_rpm_build
|
||||||
git clone https://github.com/iwestlin/gd-utils && cd gd-utils
|
git clone https://github.com/liaojack8/gd-utils-cht && cd gd-utils-cht
|
||||||
npm config set unsafe-perm=true
|
npm config set unsafe-perm=true
|
||||||
npm i
|
npm i
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -e "\033[1;32m★★★ 恭喜您!gdutils项目“TD查询转存”部分已部署完成,请上传sa到“./gd-utils/sa/”目录下完成最后的配置 ★★★\033[0m"
|
echo -e "\033[1;32m★★★ 恭喜您!gdutils项目“TD查询转存”部分已部署完成,请上传sa到“./gd-utils-cht/sa/”目录下完成最后的配置 ★★★\033[0m"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
|
|
|
@ -117,7 +117,7 @@ $cmd_install install $cmd_install_rely -y
|
||||||
curl -sL $nodejs_curl | bash -
|
curl -sL $nodejs_curl | bash -
|
||||||
$cmd_install install nodejs -y
|
$cmd_install install nodejs -y
|
||||||
$cmd_install_rpm_build
|
$cmd_install_rpm_build
|
||||||
git clone https://github.com/liaojack8/gd-utils-cht && cd gd-utils-cht
|
git clone https://github.com/iwestlin/gd-utils && cd gd-utils
|
||||||
npm config set unsafe-perm=true
|
npm config set unsafe-perm=true
|
||||||
npm i
|
npm i
|
||||||
|
|
||||||
|
@ -197,10 +197,9 @@ echo -e "\033[1;32m“nginx”起一个web服务......\033[0m"
|
||||||
cd $nginx_conf
|
cd $nginx_conf
|
||||||
echo "server {
|
echo "server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name ecbot.nctu.me;
|
server_name $YOUR_DOMAIN_NAME;
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
ssl on;
|
ssl on;
|
||||||
|
|
Loading…
Reference in New Issue