isc-dhcp-with-docker/v4/entrypoint.sh

20 lines
219 B
Bash
Raw Normal View History

2022-10-23 19:16:35 +09:00
#!/bin/ash
echo "Start container with parameter : $@"
trap sig_term SIGTERM
sig_term() {
echo "CATCH SIGTERM"
pkill -SIGTERM dhcpd
wait
exit 0
}
# Execute paramater.
exec "$@"
dhcpd -4 -f $DHCPIF &
wait
exit 1