# If there's a config file in /var/www identical to the one in /etc,
# overwrite it with a symlink after porting its permissions.
elif cmp --quiet "$release_conffile" "$etc_conffile"; then
- local ownership="$(stat -c "%U:%G" "$release_conffile")"
+ local ownership="$(stat -c "%u:%g" "$release_conffile")"
+ local owning_group="${ownership#*:}"
+ if [ 0 != "$owning_group" ]; then
+ chgrp "$owning_group" "$CONFIG_PATH" /etc/arvados
+ fi
chown "$ownership" "$etc_conffile"
chmod --reference="$release_conffile" "$etc_conffile"
- chgrp "${ownership#*:}" "$CONFIG_PATH" /etc/arvados
- chmod g+rx "$CONFIG_PATH" /etc/arvados
ln --force -s "$etc_conffile" "$release_conffile"
fi
fi
fi
run_and_report "Running bundle install" \
- $COMMAND_PREFIX bundle install --path $SHARED_PATH/vendor_bundle --quiet
+ $COMMAND_PREFIX bundle install --path $SHARED_PATH/vendor_bundle --local --quiet
echo -n "Ensuring directory and file permissions ..."
# Ensure correct ownership of a few files
fi
chown -R "$WWW_OWNER:" $RELEASE_PATH/tmp
+ setup_before_nginx_restart
+
if [ ! -z "$WEB_SERVICE" ]; then
service "$WEB_SERVICE" restart
fi