mirror of
https://github.com/jerikan-network/cmdb.git
synced 2024-05-06 04:54:50 +00:00
19 lines
365 B
Bash
19 lines
365 B
Bash
|
|
#!/bin/sh
|
||
|
|
|
||
|
|
output=$(mktemp)
|
||
|
|
trap "rm -f $output" EXIT
|
||
|
|
|
||
|
|
keepalived -t -f output/"$1"/keepalived.conf 2> $output
|
||
|
|
ret=$?
|
||
|
|
|
||
|
|
>&2 cat $output
|
||
|
|
case $ret in
|
||
|
|
4)
|
||
|
|
# If we get this error, this is harmless. It's the last check
|
||
|
|
# keepalived does.
|
||
|
|
! grep -q "^Non-existent interface specified" $output || exit 0
|
||
|
|
exit 4
|
||
|
|
;;
|
||
|
|
esac
|
||
|
|
exit $ret
|