forked from AlistGo/alist
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathserv00.sh
29 lines (25 loc) · 1.03 KB
/
serv00.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
#!/bin/sh
API_URL="https://api.github.com/repos/ykxVK8yL5L/alist/releases/latest"
#DOWNLOAD_URL=$(curl -s $API_URL | jq -r ".assets[] | select(.name | contains(\"alist-freebsd\")) | .browser_download_url")
DOWNLOAD_URL=https://github.com/ykxVK8yL5L/alist/releases/download/latest/alist-freebsd.tar.gz
curl -L $DOWNLOAD_URL -o alist.tar.gz
tar -xvf alist.tar.gz
chmod +x alist
if [ -f "./data/config.json" ]; then
echo "Alist-FreeBSD最新版本已经下载覆盖完成!"
else
nohup ./alist server > /dev/null 2>&1 &
clear
echo "已生成配置文件,请修改端口!"
echo
echo "使用命令 cd data 进入data路径下"
echo
echo "再使用 vim config.json 命令,对配置文件进行编辑,按 i 进入插入模式"
echo
echo "将 port: 5244中的 5244 修改成你放行的端口即可"
echo
echo "接着按 Esc 键退出插入模式,再按 : 键进入命令模式,并输入 wq 再回车,保存并退出"
echo
echo "再使用命令 cd .. 回到上级目录"
echo
fi