ssh-bridge 1.1.2: Alpine crond spool is /etc/crontabs - cp persistent master there before crond starts; remove stray /etc/crontabs/crontabs symlink

This commit is contained in:
Hermes Sysadmin committed 2026-11-20 00:46:32 +00:00
1 parent 5e9be625ec
commit 8fdd8b597a
2 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
name: "SSH Bridge (Tailscale)" name: "SSH Bridge (Tailscale)"
version: "1.1.1" version: "1.1.2"
slug: "ssh_bridge" slug: "ssh_bridge"
description: "Contained tailscale+sshd fleet relay: jump host, SOCKS, tailnet DNS, persistent home, crond, git-over-ssh. Runs in its own network namespace; Home Assistant and the host itself do NOT join the tailnet." description: "Contained tailscale+sshd fleet relay: jump host, SOCKS, tailnet DNS, persistent home, crond, git-over-ssh. Runs in its own network namespace; Home Assistant and the host itself do NOT join the tailnet."
url: "https://git.halfast.com/hermes/ha-addons" url: "https://git.halfast.com/hermes/ha-addons"
+7 -2
View File
@@ -43,13 +43,18 @@ fi
# busybox crontab(1) is not setuid, so the unprivileged bridge user cannot # busybox crontab(1) is not setuid, so the unprivileged bridge user cannot
# install its own crontab; create it here as root instead. The line is fixed # install its own crontab; create it here as root instead. The line is fixed
# forever — the script it runs lives in bridge's home and is freely editable. # forever — the script it runs lives in bridge's home and is freely editable.
# Alpine's crond spool is /etc/crontabs (in-image, not persistent), so keep
# the master copy in /data/crontabs and copy it into place on every boot.
cat > /data/crontabs/bridge <<'EOF' cat > /data/crontabs/bridge <<'EOF'
* * * * * $HOME/.config/fleet/supervise.sh >/dev/null 2>&1 * * * * * $HOME/.config/fleet/supervise.sh >/dev/null 2>&1
EOF EOF
chown bridge:bridge /data/crontabs/bridge chown bridge:bridge /data/crontabs/bridge
chmod 600 /data/crontabs/bridge chmod 600 /data/crontabs/bridge
ln -sfn /data/crontabs /var/spool/cron/crontabs mkdir -p /etc/crontabs
ln -sfn /data/crontabs /etc/crontabs rm -f /etc/crontabs/crontabs # stray symlink from an earlier revision
cp /data/crontabs/bridge /etc/crontabs/bridge
chown bridge:bridge /etc/crontabs/bridge
chmod 600 /etc/crontabs/bridge
crond -b -l 6 -L /data/cron.log crond -b -l 6 -L /data/cron.log
# --- sshd host key (generated once, kept in /data; never regenerate — # --- sshd host key (generated once, kept in /data; never regenerate —