Open danbo opened 7 years ago
Looks like this only happens when the container is restarted and because upon container shutdown opendkim's pid is not removed, so presumably when it's starting, thinks it's already running and doesn't actually start.
If I delete the pid file and restart the container, it starts as expected.
Not sure why it's not getting deleted as expected. Tried a few things, they didn't work, so I ended up with a hack in supervisord.conf where I force delete the pid before starting the service, ie
[program:opendkim]
command=/bin/service-wrapper.sh opendkim '/var/log/maillog' 'opendkim.*\[.*\]:'
turned into
[program:opendkim]
command=/bin/bash -c "rm -f /var/run/opendkim/opendkim.pid && /bin/service-wrapper.sh opendkim '/var/log/maillog' 'opendkim.*\[.*\]:'"
... until we figure out a better way.
Now it always starts up as expected upon container restart.