Skip to content

Commit

Permalink
Query owner group and use it (#1828)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne authored May 14, 2024
1 parent 9f6925a commit e84dd5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ prep_conffiles() {
${__as_owner} cp ssv-config/dkg-config-sample.yaml ssv-config/dkg-config.yaml
fi
# Make sure local user owns the dkg output dir and everything in it
${__auto_sudo} chown -R "${OWNER}:${OWNER}" .eth/dkg_output
${__auto_sudo} chown -R "${OWNER}:${OWNER_GROUP}" .eth/dkg_output
${__auto_sudo} chmod -R 755 .eth/dkg_output
# Create ext-network.yml if it doesn't exist
if [ ! -f "ext-network.yml" ]; then
Expand Down Expand Up @@ -3266,6 +3266,7 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
# Use this to make sure root doesn't end up owning files
# shellcheck disable=SC2012
OWNER=$(ls -ld . | awk '{print $3}')
OWNER_GROUP=$(id -gn "${OWNER}")

if [ "${OWNER}" == "root" ]; then
echo "Please install ${__project_name} as a non-root user."
Expand Down

0 comments on commit e84dd5a

Please sign in to comment.