Skip to content

Commit

Permalink
Test for ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
mbologna committed Nov 28, 2024
1 parent a26e337 commit f4b35d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit f4b35d0

Please sign in to comment.