diff --git a/config/config.go b/config/config.go index 5169d4daf..d7f7ac12e 100644 --- a/config/config.go +++ b/config/config.go @@ -20,19 +20,19 @@ package config import ( "errors" "fmt" - "github.com/polarismesh/polaris-server/apiserver" - "github.com/polarismesh/polaris-server/naming" - "github.com/polarismesh/polaris-server/naming/cache" "os" + "github.com/polarismesh/polaris-server/apiserver" "github.com/polarismesh/polaris-server/common/log" + "github.com/polarismesh/polaris-server/naming" + "github.com/polarismesh/polaris-server/naming/cache" "github.com/polarismesh/polaris-server/plugin" "github.com/polarismesh/polaris-server/store" yaml "gopkg.in/yaml.v2" ) /** - * @brief 配置 + * Config 配置 */ type Config struct { Bootstrap Bootstrap `yaml:"bootstrap"` @@ -44,7 +44,7 @@ type Config struct { } /** - * @brief 启动引导配置 + * Bootstrap 启动引导配置 */ type Bootstrap struct { Logger log.Options @@ -53,7 +53,7 @@ type Bootstrap struct { } /** - * @brief polaris-server的自注册配置 + * PolarisService polaris-server的自注册配置 */ type PolarisService struct { EnableRegister bool `yaml:"enable_register"` @@ -63,7 +63,7 @@ type PolarisService struct { } /** - * @brief 服务的自注册的配置 + * Service 服务的自注册的配置 */ type Service struct { Name string `yaml:"name"` @@ -72,7 +72,7 @@ type Service struct { } /** - * @brief 对外提供的apiServers + * APIEntries 对外提供的apiServers */ type APIEntries struct { Name string `yaml:"name"` @@ -80,13 +80,16 @@ type APIEntries struct { } const ( - DefaultPolarisName = "polaris-server" + // DefaultPolarisName default polaris name + DefaultPolarisName = "polaris-server" + // DefaultPolarisNamespace default namespace DefaultPolarisNamespace = "Polaris" - DefaultFilePath = "polaris-server.yaml" + // DefaultFilePath default file path + DefaultFilePath = "polaris-server.yaml" ) /** - * @brief 加载配置 + * Load 加载配置 */ func Load(filePath string) (*Config, error) { if filePath == "" { diff --git a/standalone/install/uninstall-darwin.sh b/standalone/install/uninstall-darwin.sh index 5a59d541c..1d8d09a1f 100644 --- a/standalone/install/uninstall-darwin.sh +++ b/standalone/install/uninstall-darwin.sh @@ -17,7 +17,7 @@ function uninstallPolarisServer() { echo -e "uninstall polaris server ... " - local polaris_server_dirname=$(find . -name "polaris-server-release*" | awk 'NR==1{print}') + local polaris_server_dirname=$(find . -name "polaris-server-release*" | grep -v "zip" | awk 'NR==1{print}') if [ ! -e ${polaris_server_dirname} ]; then echo -e "${polaris_server_dirname} not exists, skip" return @@ -33,7 +33,7 @@ function uninstallPolarisServer() { function uninstallPolarisConsole() { echo -e "uninstall polaris console ... " - local polaris_console_dirname=$(find . -name "polaris-console-release*" | awk 'NR==1{print}') + local polaris_console_dirname=$(find . -name "polaris-console-release*" | grep -v "zip" | awk 'NR==1{print}') if [ ! -e ${polaris_console_dirname} ]; then echo -e "${polaris_console_dirname} not exists, skip" return diff --git a/tool/include b/tool/include index 22f1721d1..6ad930b57 100644 --- a/tool/include +++ b/tool/include @@ -38,7 +38,7 @@ function start() { } function stop() { - pids=$(ps -e -o pid,cmd | grep -w "$cmdline" | grep -v "grep" | awk '{print $1}') + pids=$(ps -ef | grep -w "$cmdline" | grep -v "grep" | awk '{print $2}') array=($pids) for pid in ${array[@]}; do log_info "stop $server_name: pid=$pid" @@ -48,7 +48,7 @@ function stop() { } function reload() { - pids=$(ps -e -o pid,cmd | grep -w "$cmdline" | grep -v "grep" | awk '{print $1}') + pids=$(ps -ef | grep -w "$cmdline" | grep -v "grep" | awk '{print $2}') array=($pids) for pid in ${array[@]}; do log_info "reload $server_name: pid=$pid"