Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2862374985 | |||
| 1faa92266e |
@@ -9,7 +9,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
DOCKER_BUILDKIT: "1"
|
DOCKER_BUILDKIT: "1"
|
||||||
PRODUCT_NAME: "mond"
|
PRODUCT_NAME: "mond"
|
||||||
MONERO_VERSION: "v0.18.4.5"
|
MONERO_VERSION: "v0.18.4.6"
|
||||||
BUILDX_NO_DEFAULT_ATTESTATIONS: "1"
|
BUILDX_NO_DEFAULT_ATTESTATIONS: "1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ sudo apt-get install mond
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. 下载对应架构的包
|
# 1. 下载对应架构的包
|
||||||
wget https://gitea.bcde.io/releases/download/v0.18.4.5/mond-amd64-ubuntu-v0.18.4.5.tar.gz
|
wget https://gitea.bcde.io/releases/download/v0.18.4.6/mond-amd64-ubuntu-v0.18.4.6.tar.gz
|
||||||
|
|
||||||
# 2. 解压
|
# 2. 解压
|
||||||
tar -xzf mond-amd64-ubuntu-v0.18.4.5.tar.gz
|
tar -xzf mond-amd64-ubuntu-v0.18.4.6.tar.gz
|
||||||
|
|
||||||
# 3. 运行
|
# 3. 运行
|
||||||
./mond --help
|
./mond --help
|
||||||
|
|||||||
2
debian/build-deb.sh
vendored
2
debian/build-deb.sh
vendored
@@ -4,7 +4,7 @@ set -e
|
|||||||
# 参数检查
|
# 参数检查
|
||||||
if [ $# -ne 3 ]; then
|
if [ $# -ne 3 ]; then
|
||||||
echo "Usage: $0 <ARCH> <VERSION> <BINARY_DIR>"
|
echo "Usage: $0 <ARCH> <VERSION> <BINARY_DIR>"
|
||||||
echo "Example: $0 amd64 0.18.4.5 build/Linux/release/bin"
|
echo "Example: $0 amd64 0.18.4.6 build/Linux/release/bin"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
18
debian/postinst
vendored
18
debian/postinst
vendored
@@ -24,7 +24,7 @@ chmod -R 750 /var/lib/mond
|
|||||||
|
|
||||||
# Create configuration file if it doesn't exist
|
# Create configuration file if it doesn't exist
|
||||||
if [ ! -f /var/lib/mond/params.conf ]; then
|
if [ ! -f /var/lib/mond/params.conf ]; then
|
||||||
cat > /var/lib/mond/params.conf << 'EOF'
|
cat > /var/lib/mond/params.conf << 'CONF'
|
||||||
# Mond Configuration File
|
# Mond Configuration File
|
||||||
# This file is automatically created during installation
|
# This file is automatically created during installation
|
||||||
# Edit this file to customize your Mond daemon settings
|
# Edit this file to customize your Mond daemon settings
|
||||||
@@ -116,20 +116,28 @@ log-level=1
|
|||||||
|
|
||||||
# log-file: 日志文件保存路径
|
# log-file: 日志文件保存路径
|
||||||
log-file=/var/log/mond/mond.log
|
log-file=/var/log/mond/mond.log
|
||||||
EOF
|
CONF
|
||||||
chown mond:mond /var/lib/mond/params.conf
|
chown mond:mond /var/lib/mond/params.conf
|
||||||
chmod 640 /var/lib/mond/params.conf
|
chmod 640 /var/lib/mond/params.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set permissions on binary
|
# Set permissions on binary
|
||||||
chown root:mond /opt/mond/mond
|
chown root:root /opt/mond/mond
|
||||||
chmod 755 /opt/mond/mond
|
chmod 755 /opt/mond/mond
|
||||||
|
|
||||||
# Reload systemd
|
# Reload systemd and handle service restart on upgrade
|
||||||
if [ -d /run/systemd/system ]; then
|
if [ -d /run/systemd/system ]; then
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
# Note: Service is NOT auto-enabled or auto-started
|
# On upgrade: restart service if it was enabled
|
||||||
|
if [ "$1" = "configure" ] && [ -n "$2" ]; then
|
||||||
|
# $2 is the previously installed version (only set on upgrade)
|
||||||
|
if systemctl is-enabled --quiet mond.service 2>/dev/null; then
|
||||||
|
echo "Restarting mond service after upgrade..."
|
||||||
|
systemctl start mond.service || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Note: On fresh install, service is NOT auto-enabled or auto-started
|
||||||
# Users should manually enable the service:
|
# Users should manually enable the service:
|
||||||
# systemctl enable mond.service
|
# systemctl enable mond.service
|
||||||
# systemctl start mond.service
|
# systemctl start mond.service
|
||||||
|
|||||||
43
debian/prerm
vendored
43
debian/prerm
vendored
@@ -1,17 +1,36 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Stop and disable service if running
|
case "$1" in
|
||||||
if [ -d /run/systemd/system ]; then
|
upgrade)
|
||||||
if systemctl is-active --quiet mond.service; then
|
# 升级时只停止服务,保留 enabled 状态
|
||||||
echo "Stopping mond service..."
|
if [ -d /run/systemd/system ]; then
|
||||||
systemctl stop mond.service
|
if systemctl is-active --quiet mond.service; then
|
||||||
fi
|
echo "Stopping mond service for upgrade..."
|
||||||
|
systemctl stop mond.service
|
||||||
if systemctl is-enabled --quiet mond.service 2>/dev/null; then
|
fi
|
||||||
echo "Disabling mond service..."
|
fi
|
||||||
systemctl disable mond.service
|
;;
|
||||||
fi
|
remove|deconfigure)
|
||||||
fi
|
# 删除时停止并禁用服务
|
||||||
|
if [ -d /run/systemd/system ]; then
|
||||||
|
if systemctl is-active --quiet mond.service; then
|
||||||
|
echo "Stopping mond service..."
|
||||||
|
systemctl stop mond.service
|
||||||
|
fi
|
||||||
|
if systemctl is-enabled --quiet mond.service 2>/dev/null; then
|
||||||
|
echo "Disabling mond service..."
|
||||||
|
systemctl disable mond.service
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
failed-upgrade)
|
||||||
|
# 升级失败时不做操作
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "prerm called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
|
|
||||||
FROM base AS build
|
FROM base AS build
|
||||||
|
|
||||||
ARG MONERO_VERSION=v0.18.4.5
|
ARG MONERO_VERSION=v0.18.4.6
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
|||||||
Reference in New Issue
Block a user