|
@@ -42,7 +42,7 @@ fi
|
|
|
|
|
|
case "${2}" in
|
|
case "${2}" in
|
|
up)
|
|
up)
|
|
- if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP})" == "" ]; then
|
|
|
|
|
|
+ if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP}/)" == "" ]; then
|
|
|
|
|
|
# Cosmetic output not needed for multiple services
|
|
# Cosmetic output not needed for multiple services
|
|
if ! $(echo ${SERVICE} | grep -q " "); then
|
|
if ! $(echo ${SERVICE} | grep -q " "); then
|
|
@@ -69,7 +69,7 @@ case "${2}" in
|
|
;;
|
|
;;
|
|
|
|
|
|
down)
|
|
down)
|
|
- if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP})" != "" ]; then
|
|
|
|
|
|
+ if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP}/)" != "" ]; then
|
|
log_info_msg "Removing IPv4 address ${IP} from the ${1} interface..."
|
|
log_info_msg "Removing IPv4 address ${IP} from the ${1} interface..."
|
|
ip addr del ${args} dev ${1}
|
|
ip addr del ${args} dev ${1}
|
|
evaluate_retval
|
|
evaluate_retval
|