Skip to content

Commit

Permalink
Don't try to chown SSLDIR if it's read-only or we don't have permission
Browse files Browse the repository at this point in the history
Fixes #48
  • Loading branch information
bootc committed Feb 6, 2024
1 parent 906a17b commit 9fd4a3b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions puppetdb/docker-entrypoint.d/20-configure-ssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if [ "$USE_PUPPETSERVER" = true ]; then
sed -i '/^# ssl-/s/^# //g' /etc/puppetlabs/puppetdb/conf.d/jetty.ini
fi

# make sure Java apps running as puppetdb can read these files
echo "Setting ownership for $SSLDIR to puppetdb:puppetdb"
chown -R puppetdb:puppetdb ${SSLDIR}
if [ -w "$SSLDIR" ] && [ "$(id -un)" = "root" ]; then
# make sure Java apps running as puppetdb can read these files
echo "Setting ownership for $SSLDIR to puppetdb:puppetdb"
chown -R puppetdb:puppetdb ${SSLDIR}
fi

0 comments on commit 9fd4a3b

Please sign in to comment.