diff --git a/entrypoint.sh b/entrypoint.sh index 3053ef1..82bff16 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,12 @@ #!/bin/bash set -euxo pipefail -# Ensure proper permissions on the mounted data directory +# Debug log for ownership check +echo "Current owner of /var/lib/bitlbee: $(stat -c %U /var/lib/bitlbee)" + if [ "$(stat -c %U /var/lib/bitlbee)" != "bitlbee" ]; then - chown -R bitlbee:nogroup /var/lib/bitlbee + echo "Changing ownership of /var/lib/bitlbee to bitlbee" + chown -R bitlbee:nogroup /var/lib/bitlbee || echo "Failed to change ownership" +else + echo "Ownership is already correct" fi exec "$@"