# Check if it is still running. It could have terminated (e.g. as a result
# of configuration failure).
-get_pids
+get_pids ${BIN}
if [ ${_GET_PIDS_NUM} -ne 1 ]; then
- printf "ERROR: expected one Kea process to be started. Found %d processes started.\n" ${_GET_PIDS_NUM}
+ printf "ERROR: expected one Kea process to be started. Found %d processes\
+ started.\n" ${_GET_PIDS_NUM}
clean_exit 1
fi
# Check if it is still running. It could have terminated (e.g. as a result
# of configuration failure).
-get_pids
+get_pids ${BIN}
if [ ${_GET_PIDS_NUM} -ne 1 ]; then
- printf "ERROR: expected one Kea process to be started. Found %d processes started.\n" ${_GET_PIDS_NUM}
+ printf "ERROR: expected one Kea process to be started. Found %d processes\
+ started.\n" ${_GET_PIDS_NUM}
clean_exit 1
fi
fi
# Server should have shut down.
-get_pids
+get_pids ${BIN}
if [ ${_GET_PIDS_NUM} -ne 0 ]; then
- printf "ERROR: Kea did not shut down after receiving signal.\n" ${_GET_PIDS_NUM}
+ printf "ERROR: Kea did not shut down after receiving signal.\n"\
+ ${_GET_PIDS_NUM}
clean_exit 1
fi
# Sends specified signal to the Kea process.
send_signal() {
- sig=${1} # Signal number.
+ sig=${1} # Signal number.
+ proc_name=${2} # Process name
# Get Kea pid.
- get_pids
+ get_pids ${proc_name}
if [ ${_GET_PIDS_NUM} -ne 1 ]; then
- printf "ERROR: expected one Kea process to be started. Found %d processes started.\n" ${_GET_PIDS_NUM}
+ printf "ERROR: expected one Kea process to be started.\
+ Found %d processes started.\n" ${_GET_PIDS_NUM}
clean_exit 1
fi
printf "Sending signal ${sig} to Kea process (pid=%s).\n" ${_GET_PIDS}