Skip to content

Commit

Permalink
updated admin report script to use su-exec instead of gosu
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyowen committed Nov 1, 2023
1 parent 6d2a6fe commit 88fe7cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker-image-src/5/coredb/neo4j-admin-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ debug_msg "report_destination will be ${report_destination}"
debug_msg "Determining which user to run neo4j-admin as."
if running_as_root; then
debug_msg "running neo4j-admin report as root"
if [[ ! $(gosu neo4j:neo4j test -w "${report_destination}") ]]; then
if [[ ! $(su-exec neo4j:neo4j test -w "${report_destination}") ]]; then
debug_msg "reowning ${report_destination} to neo4j:neo4j"
chown neo4j:neo4j "${report_destination}"
fi
debug_msg gosu neo4j:neo4j "${report_cmd[@]}" "$@"
gosu neo4j:neo4j "${report_cmd[@]}" "$@"
debug_msg su-exec neo4j:neo4j "${report_cmd[@]}" "$@"
su-exec neo4j:neo4j "${report_cmd[@]}" "$@"
else
debug_msg "running neo4j-admin report as user defined by --user flag"
if [[ ! -w "${report_destination}" ]]; then
Expand Down

0 comments on commit 88fe7cd

Please sign in to comment.