首次提交
Some checks failed
Build and Release Mond / build-and-test (arm64, alpine) (push) Failing after 1m3s
Build and Release Mond / build-and-test (amd64, alpine) (push) Failing after 1m39s
Build and Release Mond / build-and-test (arm64, ubuntu) (push) Failing after 2m24s
Build and Release Mond / build-and-test (amd64, ubuntu) (push) Failing after 3m2s
Build and Release Mond / release (push) Has been skipped

This commit is contained in:
2025-12-15 11:15:14 +08:00
commit 2493344eba
12 changed files with 882 additions and 0 deletions

60
debian/postinst vendored Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/sh
set -e
# Create user and group if they don't exist
if ! getent group mond >/dev/null; then
addgroup --system mond
fi
if ! getent passwd mond >/dev/null; then
adduser --system --ingroup mond --no-create-home \
--home /var/lib/mond --shell /usr/sbin/nologin \
--gecos "Mond Cryptocurrency Daemon" mond
fi
# Create log directory
mkdir -p /var/log/mond
chown mond:mond /var/log/mond
chmod 750 /var/log/mond
# Create data directory
mkdir -p /var/lib/mond
chown mond:mond /var/lib/mond
chmod 750 /var/lib/mond
# Set permissions on binary
chown root:mond /opt/mond/mond
chmod 755 /opt/mond/mond
# Reload systemd
if [ -d /run/systemd/system ]; then
systemctl daemon-reload
# Note: Service is NOT auto-enabled or auto-started
# Users should manually enable the service:
# systemctl enable mond.service
# systemctl start mond.service
fi
echo ""
echo "✅ Mond installed successfully!"
echo ""
echo "📋 Service Information:"
echo ""
echo " mond - Mond cryptocurrency network daemon"
echo ""
echo "To start the daemon:"
echo " sudo systemctl enable mond.service"
echo " sudo systemctl start mond.service"
echo ""
echo "Data directory:"
echo " /var/lib/mond"
echo ""
echo "Log directory:"
echo " /var/log/mond"
echo ""
echo "Binary location:"
echo " /opt/mond/mond"
echo ""
exit 0