forked from finn/tinyboard
offboard-spoke.sh: run as root, remove sudo from python3 install
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user