mirror of
https://github.com/ivanilves/xiringuito.git
synced 2025-05-28 04:50:23 -07:00
Merge pull request #13 from ivanilves/fix/server-setup
Support more servers :)
This commit is contained in:
commit
525737ae62
@ -19,7 +19,16 @@ declare -r CLIENT_IP_ADDR=${IP_BASE}.${CLIENT_LAST_IP_ADDR_OCTET}
|
||||
declare -r SERVER_IP_ADDR=${IP_BASE}.${SERVER_LAST_IP_ADDR_OCTET}
|
||||
|
||||
declare -r SSHD_CONFIG_FILE=/etc/ssh/sshd_config
|
||||
declare -r SSHD_RESTART_CMD="/etc/init.d/sshd reload"
|
||||
|
||||
if [[ -x /bin/systemctl && -f /lib/systemd/system/ssh.service ]]; then
|
||||
declare -r SSHD_RESTART_CMD="systemctl reload ssh"
|
||||
elif [[ -f /etc/init/ssh.conf ]]; then
|
||||
declare -r SSHD_RESTART_CMD="reload ssh"
|
||||
elif [[ -x /etc/init.d/sshd ]]; then
|
||||
declare -r SSHD_RESTART_CMD="/etc/init.d/sshd reload"
|
||||
elif [[ -x /etc/init.d/ssh ]]; then
|
||||
declare -r SSHD_RESTART_CMD="/etc/init.d/ssh reload"
|
||||
fi
|
||||
|
||||
# Ensure previous tunnels with the same ID are not running
|
||||
set +e
|
||||
|
Loading…
x
Reference in New Issue
Block a user