Просмотр исходного кода

Merge pull request #7734 from emqx/emqx_ctl_status_failed_on_mac

fix: ./bin/emqx_ctl status failed
Xinyu Liu 4 лет назад
Родитель
Сommit
e27e2e2496
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      bin/emqx

+ 1 - 1
bin/emqx

@@ -425,7 +425,7 @@ else
     if [ "$(echo -e "$PS_LINE" | wc -l)" -eq 1 ]; then
         ## only one emqx node is running
         ## strip 'emqx_data_dir ' and ' --' because the dir in between may contain spaces
-        DATA_DIR="$(echo -e "$PS_LINE" | sed -e 's#.\+emqx_data_dir\s##g' | sed -e 's#\s--$##g')"
+        DATA_DIR="$(echo -e "$PS_LINE" | sed -E 's#.+emqx_data_dir[[:blank:]]##g' | sed -E 's#[[:blank:]]--$##g')"
         if [ "$DATA_DIR" = '' ]; then
             ## this should not happen unless -emqx_data_dir is not set
             die "node_is_not_running!" 1