fix(emqx-edge): fix sed error when emqx-edge start

This commit is contained in:
zhanghongtong 2021-07-12 13:46:38 +08:00 committed by Rory Z
parent d04e1c6f54
commit 54c776ebdf
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ generate_config() {
## if they are different ## if they are different
if [ -n "$TMP_ARG_VALUE" ]; then if [ -n "$TMP_ARG_VALUE" ]; then
## if the old value is present, replace it with generated value ## if the old value is present, replace it with generated value
sh -c "$SED_REPLACE 's/^$ARG_KEY.*$/$ARG_LINE/' $TMP_ARG_FILE" sh -c "$SED_REPLACE 's|^$ARG_KEY.*$|$ARG_LINE|' $TMP_ARG_FILE"
else else
## otherwise append generated value to the end ## otherwise append generated value to the end
echo "$ARG_LINE" >> "$TMP_ARG_FILE" echo "$ARG_LINE" >> "$TMP_ARG_FILE"