e854137681
Two changes:
1) Docker generator: introduce 'repo_region' select field with three modes:
auto — probe download.docker.com (5s timeout); fall back to Tuna
mirror if unreachable. Default.
official — force download.docker.com URLs (GPG + apt/yum repo).
cn — force mirrors.tuna.tsinghua.edu.cn/docker-ce URLs.
The apt/yum repo body now uses ${DOCKER_REPO_APT}/${DOCKER_REPO_YUM}
variables instead of hardcoded URLs. yum/dnf uses 'command -v
yum-config-manager' to pick the right tool (dnf-only distros like
Rocky/Alma now skip the failed yum-config-manager probe).
Tuna URLs verified reachable: curl -fsSI returned 200 for both
linux/ubuntu/gpg and linux/centos/gpg. registry_mirror default also
switched to docker.mirrors.ustc.edu.cn (was tencent cloud).
2) shell-gen.service: point WorkingDirectory and ExecStart at
/fs/1000/ftp/Project/shell-gen (the canonical git checkout) instead
of /root/shell-gen. The /root/ copy was a stale duplicate that
caused previous fixes to silently not reach the running web UI.
/root/shell-gen is preserved untouched (user has local artifacts
there: vnc_*.sh, k8s/, deliverables/, etc).
Verified:
- bash -n OK on all 3 region variants
- region=auto with reachable overseas: picks official
- region=auto with overseas-blocked (curl stubbed to fail):
DOCKER_REPO_APT/YUM correctly fall back to tuna.tsinghua,
warning emitted on stderr
- region=official: forces official URLs, no probe
- region=cn: forces Tuna URLs, no probe
- 7 other sampled generators unchanged (memcached, wireguard,
rabbitmq, chrony, mongodb, nginx, redis all bash -n OK,
$PKG_INSTALL count 0)
16 lines
319 B
Desktop File
16 lines
319 B
Desktop File
[Unit]
|
|
Description=shell-gen - Linux shell script generator
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=root
|
|
WorkingDirectory=/fs/1000/ftp/Project/shell-gen
|
|
ExecStart=/usr/bin/python3 /fs/1000/ftp/Project/shell-gen/app.py
|
|
Restart=on-failure
|
|
RestartSec=3
|
|
Environment=PORT=5099
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|