fix problem in scripts

This commit is contained in:
liaojack8 2020-07-06 10:16:01 +08:00
parent 1327616635
commit 136f9290d9
3 changed files with 259 additions and 261 deletions

View File

@ -109,13 +109,13 @@ while [[ "${#YOUR_GOOGLE_TEAM_DRIVE_ID}" != 19 ]]; do
done
cd ~ &&
sed -i "s/bot_token/$YOUR_BOT_TOKEN/g" ./gd-utils/config.js &&
sed -i "s/your_tg_username/$YOUR_TELEGRAM_ID/g" ./gd-utils/config.js &&
sed -i "s/DEFAULT_TARGET = ''/DEFAULT_TARGET = '$YOUR_GOOGLE_TEAM_DRIVE_ID'/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-cht/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“进程守护程序pm2”开始安装......\033[0m"
cd /root/gd-utils &&
cd /root/gd-utils-cht &&
npm i pm2 -g && pm2 l
echo -e "\033[1;32m启动守护进程......\033[0m"
pm2 start server.js --node-args="--max-old-space-size=4096"
@ -135,7 +135,6 @@ echo "server {
server_name $YOUR_DOMAIN_NAME;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssl on;

View File

@ -106,12 +106,12 @@ $cmd_install install $cmd_install_rely -y
curl -sL $nodejs_curl | bash -
$cmd_install install nodejs -y
$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 i
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
cd ~

View File

@ -117,7 +117,7 @@ $cmd_install install $cmd_install_rely -y
curl -sL $nodejs_curl | bash -
$cmd_install install nodejs -y
$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 i
@ -197,10 +197,9 @@ echo -e "\033[1;32m“nginx”起一个web服务......\033[0m"
cd $nginx_conf
echo "server {
listen 80;
server_name ecbot.nctu.me;
server_name $YOUR_DOMAIN_NAME;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssl on;