v1.0.0beta18.5

~同步最新Geoip数据库文件
~同步最新版本Dashboard面板
~修复面板下载成功后却提示报错的bug
~修复定时任务部分bug
This commit is contained in:
juewuy 2021-01-23 16:00:45 +08:00
parent bfd188950b
commit 8a71c3930c
2 changed files with 6 additions and 4 deletions

Binary file not shown.

View File

@ -550,12 +550,14 @@ getdb(){
echo -e "\033[33m下载成功正在解压文件\033[0m"
mkdir -p $dbdir > /dev/null
tar -zxvf "/tmp/clashdb.tar.gz" -C $dbdir > /dev/null
[ $? -ne 0 ] && tar -zxvf "/tmp/clashdb.tar.gz" --no-same-permissions -C $dbdir > /dev/null
[ $? -ne 0 ] && echo "文件解压失败!" && rm -rf /tmp/clashfm.tar.gz && exit 1
if [ $? -ne 0 ];then
tar -zxvf "/tmp/clashdb.tar.gz" --no-same-permissions -C $dbdir > /dev/null
[ $? -ne 0 ] && echo "文件解压失败!" && rm -rf /tmp/clashfm.tar.gz && exit 1
fi
#修改默认host和端口
if [ "$db_type" = "clashdb" ];then
sed -i "s/127.0.0.1/${host}/g" $dbdir/static/js/*.js
sed -i "s/9090/${db_port}/g" $dbdir/static/js/*.js
sed -i "s/127.0.0.1/${host}/g" $dbdir/assets/*.js
sed -i "s/9090/${db_port}/g" $dbdir/assets/*.js
else
sed -i "s/127.0.0.1:9090/${host}:${db_port}/g" $dbdir/app*.js
#sed -i "s/7892/${db_port}/g" $dbdir/app*.js