代码拉取完成,页面将自动刷新
#!/bin/sh
set -e
apk add py3-pip py3-yaml py3-regex py3-netifaces py3-psutil unzip py3-pillow ttyd ffmpeg git tzdata
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo "Asia/Shanghai" > /etc/timezone
mkdir -p /root/extensions/ttyd
cat << EOF > /root/extensions/ttyd/manifest.json
{
"title": "Remote web terminal (ttyd)",
"description": "Uses port 5002; User root / ssh password"
}
EOF
#echo "octoprint" > /root/.octoCredentials
cat << EOF > /root/extensions/ttyd/start.sh
#!/bin/sh
ttyd -p 5002 --credential root:\$(cat /root/.octoCredentials) bash
EOF
cat << EOF > /root/extensions/ttyd/kill.sh
#!/bin/sh
pkill ttyd
EOF
chmod +x /root/extensions/ttyd/start.sh
chmod +x /root/extensions/ttyd/kill.sh
chmod 777 /root/extensions/ttyd/start.sh
chmod 777 /root/extensions/ttyd/kill.sh
pip3 install -U packaging --ignore-installed
pip3 install https://ghproxy.com/https://github.com/feelfreelinux/octo4a-argon2-mock/archive/main.zip
pip3 install --upgrade setuptools wheel tornado --no-cache-dir
touch /home/octoprint/.argon-fix
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。