ssh-bridge 1.1.1: root-created /data/crontabs/bridge (busybox crontab not setuid); expose via /etc/crontabs + /var/spool/cron/crontabs symlinks
This commit is contained in:
1 parent
685b3542e9
commit
5e9be625ec
2 files changed
+11
-3
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
name: "SSH Bridge (Tailscale)"
|
name: "SSH Bridge (Tailscale)"
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
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"
|
||||||
|
|||||||
+10
-2
@@ -39,9 +39,17 @@ else
|
|||||||
echo "WARN: /share/ssh-bridge/tailscale_authkey missing; tailscale node not registered"
|
echo "WARN: /share/ssh-bridge/tailscale_authkey missing; tailscale node not registered"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- busybox crond with a persistent crontab spool (user-owned crontabs,
|
# --- busybox crond with a persistent crontab spool.
|
||||||
# e.g. bridge's fleet supervise entry). -b daemonizes; logs to /data.
|
# 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.
|
||||||
|
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 /var/spool/cron/crontabs
|
||||||
|
ln -sfn /data/crontabs /etc/crontabs
|
||||||
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 —
|
||||||
|
|||||||
Reference in new issue
Block a user