第一次提交
Some checks failed
Build and Release / build-and-test (amd64, ubuntu) (push) Failing after 19m29s
Build and Release / build-and-test (amd64, alpine) (push) Failing after 19m31s
Build and Release / build-and-test (arm64, ubuntu) (push) Failing after 50m10s
Build and Release / release (push) Has been cancelled
Build and Release / build-and-test (arm64, alpine) (push) Has been cancelled
Some checks failed
Build and Release / build-and-test (amd64, ubuntu) (push) Failing after 19m29s
Build and Release / build-and-test (amd64, alpine) (push) Failing after 19m31s
Build and Release / build-and-test (arm64, ubuntu) (push) Failing after 50m10s
Build and Release / release (push) Has been cancelled
Build and Release / build-and-test (arm64, alpine) (push) Has been cancelled
This commit is contained in:
61
debian/postinst
vendored
Executable file
61
debian/postinst
vendored
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Create user and group if they don't exist
|
||||
if ! getent group p2pool >/dev/null; then
|
||||
addgroup --system p2pool
|
||||
fi
|
||||
|
||||
if ! getent passwd p2pool >/dev/null; then
|
||||
adduser --system --ingroup p2pool --no-create-home \
|
||||
--home /var/lib/p2pool --shell /usr/sbin/nologin \
|
||||
--gecos "P2Pool Service" p2pool
|
||||
fi
|
||||
|
||||
# Create data directory
|
||||
mkdir -p /var/lib/p2pool
|
||||
chown p2pool:p2pool /var/lib/p2pool
|
||||
chmod 750 /var/lib/p2pool
|
||||
|
||||
# Create log directory
|
||||
mkdir -p /var/log/p2pool
|
||||
chown p2pool:p2pool /var/log/p2pool
|
||||
chmod 750 /var/log/p2pool
|
||||
|
||||
# Set binary permissions
|
||||
chown root:root /usr/local/bin/p2pool
|
||||
chmod 755 /usr/local/bin/p2pool
|
||||
|
||||
# Reload systemd
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "✅ P2Pool installed successfully!"
|
||||
echo ""
|
||||
echo "📋 Before starting P2Pool, you MUST:"
|
||||
echo ""
|
||||
echo "1. Edit the systemd service file to set your Monero wallet address:"
|
||||
echo " sudo systemctl edit --full p2pool.service"
|
||||
echo ""
|
||||
echo " Replace 'YOUR_MONERO_WALLET_ADDRESS' with your actual Monero wallet address"
|
||||
echo " and configure --host and --rpc-port to point to your Monero node"
|
||||
echo ""
|
||||
echo "2. Start P2Pool:"
|
||||
echo " sudo systemctl enable p2pool.service"
|
||||
echo " sudo systemctl start p2pool.service"
|
||||
echo ""
|
||||
echo "3. Check status:"
|
||||
echo " sudo systemctl status p2pool.service"
|
||||
echo " sudo journalctl -u p2pool -f"
|
||||
echo ""
|
||||
echo "Data directory: /var/lib/p2pool"
|
||||
echo "Log directory: /var/log/p2pool"
|
||||
echo "Binary: /usr/local/bin/p2pool"
|
||||
echo ""
|
||||
echo "For help:"
|
||||
echo " p2pool --help"
|
||||
echo ""
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user