1
0
forked from finn/tinyboard

setup-hub.sh: fix sed delimiter and add file dep, onboard-spoke.sh: fix rclone append newline guard and keyscan key-type dedup, offboard-spoke.sh: fix crontab empty check and add timestamped backup, setup-network.sh: replace single bak with timestamped backup, compose.yaml: replace syncthing host network with explicit port bindings

This commit is contained in:
Justin Oros
2026-04-18 14:31:10 -07:00
parent f3792a38fc
commit 128b41ede9
6 changed files with 29 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ check_permissions() {
[ "$(id -u)" -eq 0 ] || die "Run as root"
check_deps ssh ssh-keygen systemctl useradd groupadd
check_deps ssh ssh-keygen systemctl useradd groupadd file
header "TinyBoard Hub Setup"
@@ -154,7 +154,7 @@ SSHD_CONF="/etc/ssh/sshd_config"
for DIRECTIVE in "GatewayPorts yes" "AllowTcpForwarding yes" "ClientAliveInterval 60" "ClientAliveCountMax 3"; do
KEY="${DIRECTIVE%% *}"
if grep -q "^$KEY" "$SSHD_CONF"; then
sed -i "s/^$KEY.*/$DIRECTIVE/" "$SSHD_CONF"
sed -i "s|^$KEY.*|$DIRECTIVE|" "$SSHD_CONF"
else
echo "$DIRECTIVE" >> "$SSHD_CONF"
fi