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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user