Skip to content

Commit

Permalink
Create broker.conf and broker.conf.d with permissions 0700
Browse files Browse the repository at this point in the history
  • Loading branch information
adombeck committed Dec 18, 2024
1 parent 4e490fd commit e760b80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion snap/hooks/install
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
set -eu

cp --update=none ${SNAP}/conf/broker.conf.orig ${SNAP_DATA}/broker.conf
install --mode=0700 "${SNAP}/conf/broker.conf.orig" "${SNAP_DATA}/broker.conf"
3 changes: 1 addition & 2 deletions snap/hooks/post-refresh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ should_transition_to_allowed_users() {

transition_to_allowed_users() {
log "Transitioning to allowed users"
mkdir -p "${SNAP_DATA}/broker.conf.d"
cp --update=none "${SNAP}/conf/migrations/pre-${INITIAL_ALLOWED_USERS_VERSION}/broker.conf.d/"* "${SNAP_DATA}/broker.conf.d/"
install -D --target-directory --mode=0700"${SNAP_DATA}/broker.conf.d" "${SNAP}/conf/migrations/pre-${INITIAL_ALLOWED_USERS_VERSION}/broker.conf.d/"*
}

if [ -z "${PREVIOUS_VERSION}" ]; then
Expand Down

0 comments on commit e760b80

Please sign in to comment.