1
0
forked from finn/tinyboard

offboard-spoke.sh: run as root, remove sudo from python3 install

This commit is contained in:
Justin Oros
2026-04-18 14:04:24 -07:00
parent 535c8a47cb
commit 74e1a9d1a0
6 changed files with 51 additions and 26 deletions

View File

@@ -162,12 +162,13 @@ for DIRECTIVE in "GatewayPorts yes" "AllowTcpForwarding yes" "ClientAliveInterva
done
SSH_SVC=""
if systemctl list-unit-files ssh.service >/dev/null 2>&1 && systemctl enable ssh 2>/dev/null; then
if systemctl list-unit-files ssh.service >/dev/null 2>&1; then
SSH_SVC="ssh"
elif systemctl list-unit-files sshd.service >/dev/null 2>&1 && systemctl enable sshd 2>/dev/null; then
elif systemctl list-unit-files sshd.service >/dev/null 2>&1; then
SSH_SVC="sshd"
fi
if [ -n "$SSH_SVC" ]; then
systemctl enable "$SSH_SVC" 2>/dev/null || true
systemctl restart "$SSH_SVC"
info "SSH server restarted."
else