重构为 musl 纯静态打包,配置迁 /etc,对齐三项目
Build and Release / release (push) Has been skipped
Build and Release / build-and-test (amd64) (push) Failing after 3m8s
Build and Release / build-and-test (arm64) (push) Failing after 7m31s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 14:55:12 +08:00
co-authored by Claude Opus 4.8
parent b222b802bf
commit 3b024fdc10
14 changed files with 307 additions and 312 deletions
+17 -32
View File
@@ -1,33 +1,18 @@
case "$1" in
upgrade)
# Stop service only during upgrade, keep enabled state
if [ -d /run/systemd/system ]; then
if systemctl is-active --quiet p2pool.service; then
echo "Stopping p2pool service for upgrade..."
systemctl stop p2pool.service
fi
fi
;;
remove|deconfigure)
# Stop and disable service during removal
if [ -d /run/systemd/system ]; then
if systemctl is-active --quiet p2pool.service; then
echo "Stopping p2pool service..."
systemctl stop p2pool.service
fi
if systemctl is-enabled --quiet p2pool.service 2>/dev/null; then
echo "Disabling p2pool service..."
systemctl disable p2pool.service
fi
fi
;;
failed-upgrade)
# Do nothing on failed upgrade
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#!/bin/sh
set -e
exit 0
# 仅在卸载(remove)时停用服务;升级(upgrade)时保持运行,
# 由 postinst 的 try-restart 重启以加载新二进制
if [ "$1" = "remove" ] && [ -d /run/systemd/system ]; then
if systemctl is-active --quiet p2pool.service; then
echo "Stopping p2pool service..."
systemctl stop p2pool.service
fi
if systemctl is-enabled --quiet p2pool.service 2>/dev/null; then
echo "Disabling p2pool service..."
systemctl disable p2pool.service
fi
fi
exit 0