优化 Debian 包管理,简化发行版配置
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -11s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -5s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in -1s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 8s
Build and Release / release (push) Successful in 37s
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -11s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -5s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in -1s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 8s
Build and Release / release (push) Successful in 37s
- CI:简化 Debian 包发布流程,统一使用 stable 发行版 - 移除 bookworm 和 trixie 多发行版支持,简化维护 - postinst:优化安装完成提示,提供清晰的配置和启动步骤 - postrm/prerm:改进卸载和升级前的清理逻辑 - README:更新安装说明,使用 stable 仓库 - install.deb.sh:同步更新仓库配置
This commit is contained in:
48
debian/postinst
vendored
48
debian/postinst
vendored
@@ -56,27 +56,43 @@ fi
|
||||
echo ""
|
||||
echo "✅ XXXigCC installed successfully!"
|
||||
echo ""
|
||||
echo "📋 Service Information:"
|
||||
echo "📋 Configuration and startup:"
|
||||
echo ""
|
||||
echo " xxxigcc-server - Control server with web UI (uses config_cc.json)"
|
||||
echo " xxxigcc-daemon - Mining client daemon (uses config.json, auto-calls xxxigMiner)"
|
||||
echo "1. Review and configure settings (optional):"
|
||||
echo " For mining client:"
|
||||
echo " sudo nano /etc/xxxigcc/config.json"
|
||||
echo " For control server:"
|
||||
echo " sudo nano /etc/xxxigcc/config_cc.json"
|
||||
echo ""
|
||||
echo "To start the server (central control):"
|
||||
echo " sudo systemctl enable xxxigcc-server.service"
|
||||
echo " sudo systemctl start xxxigcc-server.service"
|
||||
echo " Adjust pool settings, wallet address, CC server, and other options as needed."
|
||||
echo ""
|
||||
echo "To start the daemon (mining client):"
|
||||
echo " sudo systemctl enable xxxigcc-daemon.service"
|
||||
echo " sudo systemctl start xxxigcc-daemon.service"
|
||||
echo "2. Start services:"
|
||||
echo ""
|
||||
echo "Configuration files:"
|
||||
echo " /etc/xxxigcc/config.json - Daemon/Miner configuration"
|
||||
echo " /etc/xxxigcc/config_cc.json - Server configuration"
|
||||
echo " For mining client (daemon):"
|
||||
echo " sudo systemctl enable xxxigcc-daemon.service"
|
||||
echo " sudo systemctl start xxxigcc-daemon.service"
|
||||
echo ""
|
||||
echo "Binaries location:"
|
||||
echo " /opt/xxxigcc/xxxigServer - Control server"
|
||||
echo " /opt/xxxigcc/xxxigDaemon - Client daemon (auto-calls xxxigMiner)"
|
||||
echo " /opt/xxxigcc/xxxigMiner - Miner executable"
|
||||
echo " For control server (optional, Web UI on port 3344):"
|
||||
echo " sudo systemctl enable xxxigcc-server.service"
|
||||
echo " sudo systemctl start xxxigcc-server.service"
|
||||
echo ""
|
||||
echo "3. Check status:"
|
||||
echo " sudo systemctl status xxxigcc-daemon"
|
||||
echo " sudo journalctl -u xxxigcc-daemon -f"
|
||||
echo ""
|
||||
echo "📁 Important paths:"
|
||||
echo " Config files: /etc/xxxigcc/config.json (daemon)"
|
||||
echo " /etc/xxxigcc/config_cc.json (server)"
|
||||
echo " Log directory: /var/log/xxxigcc"
|
||||
echo " Binaries: /opt/xxxigcc/xxxigServer (control server)"
|
||||
echo " /opt/xxxigcc/xxxigDaemon (mining daemon)"
|
||||
echo " /opt/xxxigcc/xxxigMiner (miner executable)"
|
||||
echo ""
|
||||
echo "💡 Tip: Your config files will NOT be overwritten during package upgrades."
|
||||
echo ""
|
||||
echo "For help:"
|
||||
echo " /opt/xxxigcc/xxxigDaemon --help"
|
||||
echo " /opt/xxxigcc/xxxigServer --help"
|
||||
echo ""
|
||||
|
||||
exit 0
|
||||
|
||||
31
debian/postrm
vendored
31
debian/postrm
vendored
@@ -3,28 +3,33 @@ set -e
|
||||
|
||||
case "$1" in
|
||||
purge)
|
||||
# Remove log directory
|
||||
rm -rf /var/log/xxxigcc
|
||||
|
||||
# Remove config directory
|
||||
rm -rf /etc/xxxigcc
|
||||
|
||||
# Remove user and group
|
||||
if getent passwd xxxigcc >/dev/null; then
|
||||
deluser --system xxxigcc 2>/dev/null || true
|
||||
deluser --quiet xxxigcc || true
|
||||
fi
|
||||
|
||||
if getent group xxxigcc >/dev/null; then
|
||||
delgroup --system xxxigcc 2>/dev/null || true
|
||||
delgroup --quiet xxxigcc || true
|
||||
fi
|
||||
|
||||
# Remove data directories (only on purge)
|
||||
rm -rf /var/log/xxxigcc
|
||||
rm -rf /etc/xxxigcc
|
||||
;;
|
||||
|
||||
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
# Reload systemd
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
# Do nothing
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
# Reload systemd
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
exit 0
|
||||
6
debian/prerm
vendored
6
debian/prerm
vendored
@@ -4,11 +4,13 @@ set -e
|
||||
# Stop services before removal
|
||||
if [ -d /run/systemd/system ]; then
|
||||
for service in xxxigcc-server.service xxxigcc-daemon.service; do
|
||||
if systemctl is-active "$service" >/dev/null 2>&1; then
|
||||
if systemctl is-active --quiet "$service"; then
|
||||
echo "Stopping $service..."
|
||||
systemctl stop "$service"
|
||||
fi
|
||||
|
||||
if systemctl is-enabled "$service" >/dev/null 2>&1; then
|
||||
if systemctl is-enabled --quiet "$service"; then
|
||||
echo "Disabling $service..."
|
||||
systemctl disable "$service"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user