Files
Linux/alpine.sh
mini2024 c4f19befa7 Update
2025-03-09 23:14:21 +08:00

23 lines
545 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cat <<EOF > /etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/v3.21/main
http://dl-cdn.alpinelinux.org/alpine/v3.21/community
EOF
# 更新软件包索引
apk update
# 升级所有软件包
apk upgrade --available
# 清理缓存
apk cache clean
# 更彻底地清理
# rm -rf /var/cache/apk/*
# 检查是否有失败的服务OpenRC等效命令
rc-status --crashed || echo "没有检测到失败的服务"
# 重启系统
# reboot
# 判断是否需要重启
# https://github.com/copilot/share/42124018-0980-80c5-8001-a60ae0644914