Compare commits

...

3 Commits

5 changed files with 44 additions and 10 deletions

View File

@ -29,11 +29,13 @@ jobs:
# -*- coding: utf-8 -*-
import json
import os
import subprocess
def set_env(name, value):
with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as f:
f.write(f'{name}={value}\n')
subprocess.call(f'echo "{name}<<EOF" >> $GITHUB_ENV', shell=True)
subprocess.call(f'echo "{value}" >> $GITHUB_ENV', shell=True)
subprocess.call(f'echo "EOF" >> $GITHUB_ENV', shell=True)
issuetitle = """${{ github.event.issue.title }}"""
issuebody = """${{ github.event.issue.body }}"""

View File

@ -45,6 +45,44 @@ If you cannot connect to the Internet, please build a pre-compiled bootloader th
--img <path> Local image path, use local image if set
```
- Docker Compose:
```yml
# 请从最新版本中下载 rr.img 文件。
# 并将 <path_to_rr.img> 替换为你的 rr.img 文件的实际路径.
# Please download the rr.img file from the latest release.
# And replace <path_to_rr.img> with the actual path to your rr.img file.
version: "3.9"
services:
rr:
image: qemux/qemu:latest
container_name: rr
environment:
BOOT: ""
RAM_SIZE: "4G" # >= 4G recommended for DSM
CPU_CORES: "2"
DISK_TYPE: "sata"
DISK_SIZE: "32G" # data disk size
ARGUMENTS: "-device nec-usb-xhci,id=usb0,multifunction=on -drive file=/rr.img,media=disk,format=raw,if=none,id=udisk1 -device usb-storage,bus=usb0.0,port=1,drive=udisk1,bootindex=999,removable=on"
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 5000:5000 # For DSM management
- 5001:5001 # For DSM management
- 7681:7681 # For RR management
- 7304:7304 # For RR management
- 7080:7080 # For RR management
- 8006:8006 # For QEMU management
volumes:
- ./rr.img:/rr.img # <path_to_rr.img>:/rr.img
- ./data:/storage
restart: always
stop_grace_period: 2m
```
### 4: GPU:

View File

@ -435,11 +435,8 @@ else
IP="$(getIP)"
echo "${IP}" | grep -q "^169\.254\." && IP=""
[ -n "${IP}" ] && URL="http://${IP}:5000" || URL="http://find.synology.com/"
python3 "${WORK_PATH}/include/functions.py" "makeqr" -d "${URL}" -l "6" -o "${TMP_PATH}/qrcode_boot.png"
python3 "${WORK_PATH}/include/functions.py" "makeqr" -d "${URL}" -l "7" -o "${TMP_PATH}/qrcode_boot.png"
[ -f "${TMP_PATH}/qrcode_boot.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_boot.png" >/dev/null 2>&1 || true
python3 "${WORK_PATH}/include/functions.py" "makeqr" -f "${WORK_PATH}/include/qhxg.png" -l "7" -o "${TMP_PATH}/qrcode_qhxg.png"
[ -f "${TMP_PATH}/qrcode_qhxg.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_qhxg.png" >/dev/null 2>&1 || true
fi
# Executes DSM kernel via KEXEC

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

View File

@ -263,9 +263,6 @@ if [ "${DSMLOGO}" = "true" ] && [ -c "/dev/fb0" ] && [ ! -f "/.dockerenv" ]; the
[ -n "${IP}" ] && URL="http://${IP}:${TTYD:-7681}" || URL="http://rr:${TTYD:-7681}"
python3 "${WORK_PATH}/include/functions.py" makeqr -d "${URL}" -l "0" -o "${TMP_PATH}/qrcode_init.png"
[ -f "${TMP_PATH}/qrcode_init.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_init.png" >/dev/null 2>&1 || true
python3 "${WORK_PATH}/include/functions.py" makeqr -f "${WORK_PATH}/include/qhxg.png" -l "7" -o "${TMP_PATH}/qrcode_qhxg.png"
[ -f "${TMP_PATH}/qrcode_qhxg.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_qhxg.png" >/dev/null 2>&1 || true
fi
WEBHOOKURL="$(readConfigKey "webhookurl" "${USER_CONFIG_FILE}")"
if [ -n "${WEBHOOKURL}" ] && [ ! -f "${TMP_PATH}/WebhookSent" ] && [ ! -f "/.dockerenv" ]; then