mirror of
https://github.com/ivanilves/xiringuito.git
synced 2025-05-19 00:30:08 -07:00
Merge branch 'fix/server-path-env-var'
* fix/server-path-env-var: Solve (?) CentOS6 environment / PATH issue
This commit is contained in:
commit
0d0669c335
@ -15,6 +15,10 @@ declare -r NETWORK_DEVICE=tun${TUNNEL_ID}
|
||||
let CLIENT_LAST_IP_ADDR_OCTET="4*(${TUNNEL_ID}-1)+1"
|
||||
declare -r CLIENT_IP_ADDR=${IP_BASE}.${CLIENT_LAST_IP_ADDR_OCTET}
|
||||
|
||||
if [[ ! $(echo "${PATH}" | egrep "(^|:)/sbin($|:)") ]]; then
|
||||
export PATH="/sbin:${PATH}"
|
||||
fi
|
||||
|
||||
trap teardown EXIT
|
||||
|
||||
function teardown() {
|
||||
|
@ -20,6 +20,10 @@ declare -r SERVER_IP_ADDR=${IP_BASE}.${SERVER_LAST_IP_ADDR_OCTET}
|
||||
|
||||
declare -r SSHD_CONFIG_FILE=/etc/ssh/sshd_config
|
||||
|
||||
if [[ ! $(echo "${PATH}" | egrep "(^|:)/sbin($|:)") ]]; then
|
||||
export PATH="/sbin:${PATH}"
|
||||
fi
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user