-
Notifications
You must be signed in to change notification settings - Fork 19
/
termux_install_ql.sh
41 lines (34 loc) · 1.15 KB
/
termux_install_ql.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
#!/bin/bash
export QL_DIR=/ql
export QL_BRANCH=v2.15.8
export LANG=zh_CN.UTF-8
export TERMUX_APK_RELEASE=F-DROID
export SHELL=/bin/bash
export PNPM_HOME=~/.local/share/pnpm
export PATH=$PATH:~/.local/share/pnpm:~/.local/share/pnpm/global/5/node_modules
cat << EOF >> /etc/profile.d/ql_env.sh
nameserver 119.29.29.29
nameserver 8.8.8.8
EOF
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
apk update -f
apk upgrade
apk --no-cache add -f bash make nodejs npm coreutils moreutils git curl wget tzdata perl openssl nginx jq openssh py3-pip
cleanapkcache
apk update
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo "Asia/Shanghai" > /etc/timezone
npm config set registry https://registry.npmjs.org
npm install -g pnpm
pnpm add -g pm2 ts-node typescript tslib
mkdir -p $QL_DIR
git clone -b $QL_BRANCH https://gitee.com/whyour/qinglong.git $QL_DIR
cd $QL_DIR
cp -f .env.example .env
chmod 777 $QL_DIR/shell/*.sh
chmod 777 $QL_DIR/docker/*.sh
pnpm install --prod
mkdir -p $QL_DIR/static
git clone -b $QL_BRANCH https://gitee.com/whyour/qinglong-static.git $QL_DIR/static
ln -s /ql/docker/docker-entrypoint.sh /usr/bin/qinglong
qinglong