Skip to content

Instantly share code, notes, and snippets.

@del-xiong
Last active August 10, 2022 10:04
Show Gist options
  • Save del-xiong/d4422098d1d49db42726855a47c6e747 to your computer and use it in GitHub Desktop.
Save del-xiong/d4422098d1d49db42726855a47c6e747 to your computer and use it in GitHub Desktop.
宝塔移除登录强制绑定 最新兼容7.8.0
sed -i "s|show_force_bind();||g" /www/server/panel/BTPanel/static/js/index.js && \
sed -i "s|if not public.is_bind():||g" /www/server/panel/BTPanel/__init__.py && \
sed -i "s|return redirect('/bind',302)||g" /www/server/panel/BTPanel/__init__.py
# 执行完毕后重启 bt 1
@del-xiong
Copy link
Author

7.8.0之前的

sed -i "s|show_force_bind();||g" /www/server/panel/BTPanel/static/js/index.js && \
sed -i "s|if not public.is_bind():||g" /www/server/panel/BTPanel/__init__.py && \
sed -i "s|return redirect('/bind',302)||g" /www/server/panel/BTPanel/__init__.py

7.8.0之后的(未完成)

sed -i "s|os.remove(u_path)|os.fstat(u_path)|g" /www/server/panel/class/ajax.py && \
sed -i "s|self.get_cloud_list(get)\['list'\]|\[\]|g" /www/server/panel/class/panelPlugin.py && \
echo '{"access_key": "", "username": "15901230123", "idc_code": "", "uid": 190000, "addtime": 1603367701, "state": 1, "address": "10.1.1.1", "secret_key": "0b7a1b9ed24de4b8592aa8bd9a55ef48", "serverid": "f2051251a09515a04f79ef8489abecdb"}' > data/userInfo.json

执行完毕后重启 bt 1

@del-xiong
Copy link
Author

del-xiong commented Mar 5, 2022

降级7.7.0

wget http://download.bt.cn/install/update/LinuxPanel-7.7.0.zip && unzip LinuxPanel-7.7.0.zip && cd LinuxPanel-7.7.0/panel && bash update.sh && cd ../.. && rm -rf LinuxPanel-7.7.0.zip && rm -rf LinuxPanel-7.7.0

@predators46
Copy link

7.9.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment