Samba-ad-dc-ddns-doker/v4/entrypoint.sh

24 lines
277 B
Bash
Executable File

#!/bin/bash
echo "Start container with parameter : $@"
trap sig_term SIGTERM
sig_term() {
echo "CATCH SIGTERM"
pkill -SIGTERM dhcpd
wait
exit 0
}
# Execute paramater.
exec "$@"
if [ ${DHCPDBGFLG^^} = "TRUE" ]; then
DBG="-d"
fi
dhcpd -4 $DBG -f $DHCPIF &
wait
exit 1