mirror of
https://github.com/ivanilves/xiringuito.git
synced 2025-06-01 23:10:14 -07:00
Solve (?) CentOS6 environment / PATH issue
This commit is contained in:
parent
c88d892fab
commit
69371a45a1
@ -15,6 +15,10 @@ declare -r NETWORK_DEVICE=tun${TUNNEL_ID}
|
|||||||
let CLIENT_LAST_IP_ADDR_OCTET="4*(${TUNNEL_ID}-1)+1"
|
let CLIENT_LAST_IP_ADDR_OCTET="4*(${TUNNEL_ID}-1)+1"
|
||||||
declare -r CLIENT_IP_ADDR=${IP_BASE}.${CLIENT_LAST_IP_ADDR_OCTET}
|
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
|
trap teardown EXIT
|
||||||
|
|
||||||
function teardown() {
|
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
|
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
|
if [[ -x /bin/systemctl && -f /lib/systemd/system/ssh.service ]]; then
|
||||||
declare -r SSHD_RESTART_CMD="systemctl reload ssh"
|
declare -r SSHD_RESTART_CMD="systemctl reload ssh"
|
||||||
elif [[ -f /etc/init/ssh.conf ]]; then
|
elif [[ -f /etc/init/ssh.conf ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user