Fix: entrypoint.sh permissions

This commit is contained in:
Michele Bologna
2024-11-28 10:34:52 +01:00
parent afac4af31f
commit b52e5d6523
3 changed files with 13 additions and 7 deletions

View File

@@ -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 "$@"