Skip to content

Commit

Permalink
sed compatibility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbirse committed Oct 16, 2023
1 parent 6e26eee commit 9affc53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ if [ ! -f ${COMPOSE_ENV_FILE} ]; then
cp "${COMPOSE_ENV_FILE}.sample" "${COMPOSE_ENV_FILE}"
else
# Convert GRAFANAUSER to PWD_USER in existing compose env file (required in 2.10.0)
sed -i "s@GRAFANAUSER@PWD_USER@g" "${COMPOSE_ENV_FILE}"
sed -i.bak "s@GRAFANAUSER@PWD_USER@g" "${COMPOSE_ENV_FILE}"
if grep -q "^PWD_USER=\"1000:1000\"" "${COMPOSE_ENV_FILE}"; then
sed -i "s@^PWD_USER=\"1000:1000\"@#PWD_USER=\"1000:1000\"@g" "${COMPOSE_ENV_FILE}"
sed -i.bak "s@^PWD_USER=\"1000:1000\"@#PWD_USER=\"1000:1000\"@g" "${COMPOSE_ENV_FILE}"
fi
fi

Expand Down

0 comments on commit 9affc53

Please sign in to comment.