diff --git a/ssh-bridge/config.yaml b/ssh-bridge/config.yaml index c9582e8..9d05174 100644 --- a/ssh-bridge/config.yaml +++ b/ssh-bridge/config.yaml @@ -1,5 +1,5 @@ name: "SSH Bridge (Tailscale)" -version: "1.1.1" +version: "1.1.2" 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." url: "https://git.halfast.com/hermes/ha-addons" diff --git a/ssh-bridge/run.sh b/ssh-bridge/run.sh index 5d3e9da..4d92b3f 100755 --- a/ssh-bridge/run.sh +++ b/ssh-bridge/run.sh @@ -43,13 +43,18 @@ fi # 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 # 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' * * * * * $HOME/.config/fleet/supervise.sh >/dev/null 2>&1 EOF chown bridge:bridge /data/crontabs/bridge chmod 600 /data/crontabs/bridge -ln -sfn /data/crontabs /var/spool/cron/crontabs -ln -sfn /data/crontabs /etc/crontabs +mkdir -p /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 # --- sshd host key (generated once, kept in /data; never regenerate —