添加deb包构建,删除容器构建
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 8s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 15s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 19s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 37s
Build and Release / release (push) Successful in 1m8s
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 8s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 15s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 19s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 37s
Build and Release / release (push) Successful in 1m8s
This commit is contained in:
82
debian/postinst
vendored
Executable file
82
debian/postinst
vendored
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Create user and group if they don't exist
|
||||
if ! getent group xxxigcc >/dev/null; then
|
||||
addgroup --system xxxigcc
|
||||
fi
|
||||
|
||||
if ! getent passwd xxxigcc >/dev/null; then
|
||||
adduser --system --ingroup xxxigcc --no-create-home \
|
||||
--home /opt/xxxigcc --shell /usr/sbin/nologin \
|
||||
--gecos "XXXigCC Service" xxxigcc
|
||||
fi
|
||||
|
||||
# Create log directory
|
||||
mkdir -p /var/log/xxxigcc
|
||||
chown xxxigcc:xxxigcc /var/log/xxxigcc
|
||||
chmod 750 /var/log/xxxigcc
|
||||
|
||||
# Create config directory
|
||||
mkdir -p /etc/xxxigcc
|
||||
|
||||
# Copy default configs if they don't exist
|
||||
if [ ! -f /etc/xxxigcc/config.json ]; then
|
||||
cp /opt/xxxigcc/config.json /etc/xxxigcc/config.json
|
||||
chown xxxigcc:xxxigcc /etc/xxxigcc/config.json
|
||||
chmod 640 /etc/xxxigcc/config.json
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/xxxigcc/config_cc.json ]; then
|
||||
cp /opt/xxxigcc/config_cc.json /etc/xxxigcc/config_cc.json
|
||||
chown xxxigcc:xxxigcc /etc/xxxigcc/config_cc.json
|
||||
chmod 640 /etc/xxxigcc/config_cc.json
|
||||
fi
|
||||
|
||||
# Set permissions
|
||||
chown -R xxxigcc:xxxigcc /opt/xxxigcc
|
||||
chmod 755 /opt/xxxigcc
|
||||
chmod 755 /opt/xxxigcc/xxxigServer
|
||||
chmod 755 /opt/xxxigcc/xxxigDaemon
|
||||
chmod 755 /opt/xxxigcc/xxxigMiner
|
||||
|
||||
# Reload systemd
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl daemon-reload
|
||||
|
||||
# Note: Services are NOT auto-enabled or auto-started
|
||||
# Users should manually enable the services they need:
|
||||
# systemctl enable xxxigcc-server.service
|
||||
# systemctl start xxxigcc-server.service
|
||||
# or
|
||||
# systemctl enable xxxigcc-daemon.service
|
||||
# systemctl start xxxigcc-daemon.service
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "✅ XXXigCC installed successfully!"
|
||||
echo ""
|
||||
echo "📋 Service Information:"
|
||||
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 ""
|
||||
echo "To start the server (central control):"
|
||||
echo " sudo systemctl enable xxxigcc-server.service"
|
||||
echo " sudo systemctl start xxxigcc-server.service"
|
||||
echo ""
|
||||
echo "To start the daemon (mining client):"
|
||||
echo " sudo systemctl enable xxxigcc-daemon.service"
|
||||
echo " sudo systemctl start xxxigcc-daemon.service"
|
||||
echo ""
|
||||
echo "Configuration files:"
|
||||
echo " /etc/xxxigcc/config.json - Daemon/Miner configuration"
|
||||
echo " /etc/xxxigcc/config_cc.json - Server configuration"
|
||||
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 ""
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user