diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index eb08c43..b8531c4 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/scripts/getdate.sh b/scripts/getdate.sh index 72012e5..81abbc2 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -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