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

25 lines
301 B
Bash
Raw Normal View History

2022-10-30 10:59:26 +09:00
#!/bin/bash
echo "Start container with parameter : $@"
trap sig_term SIGTERM
sig_term() {
echo "CATCH SIGTERM"
pkill -SIGTERM dhcpd
pkill -SIGTERM radvd
wait
exit 0
}
# Execute paramater.
exec "$@"
if [ ${DHCPDBGFLG^^} = "TRUE" ]; then
DBG=-d
fi
dhcpd -6 $DBG -f $DHCPIF &
radvd -n &
wait