mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-11-13 02:55:09 +08:00
35fa2d7acf
Apparently using sleep with very large numbers is not a good idea when your image can be compiled down to 32-bit platforms. This fix uses `sleep infinity` and -- failing that -- tries to sleep for about 68 years (which is exactly 2^15 seconds).
19 lines
369 B
Bash
19 lines
369 B
Bash
#!/bin/sh
|
|
|
|
noop() {
|
|
while true; do
|
|
# 2147483647 = max signed 32-bit integer
|
|
# 2147483647 s ≅ 70 years
|
|
sleep infinity || sleep 2147483647
|
|
done
|
|
}
|
|
|
|
if [ ! -d /etc/opendkim/keys ]; then
|
|
noop
|
|
elif [ -z "$(find /etc/opendkim/keys -type f ! -name .)" ]; then
|
|
noop
|
|
else
|
|
/usr/sbin/opendkim -D -f -x /etc/opendkim/opendkim.conf
|
|
fi
|
|
|
|
|