From 6f9fc69c2ed80aa1e0f621352cb097bf02d15d2a Mon Sep 17 00:00:00 2001 From: Pavel Sviderski Date: Tue, 1 Oct 2024 13:33:54 +1000 Subject: [PATCH] fix corrosion data dir, add reload to systemd unit --- internal/machine/machine.go | 2 +- scripts/install.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/machine/machine.go b/internal/machine/machine.go index 1db4f38b..b6069524 100644 --- a/internal/machine/machine.go +++ b/internal/machine/machine.go @@ -53,7 +53,7 @@ func (c *Config) SetDefaults() *Config { cfg.APISockPath = DefaultAPISockPath } if cfg.CorrosionDir == "" { - cfg.CorrosionDir = filepath.Join(cfg.DataDir, "corroservice") + cfg.CorrosionDir = filepath.Join(cfg.DataDir, "corrosion") } if !cfg.CorrosionAPIListenAddr.IsValid() { cfg.CorrosionAPIListenAddr = netip.AddrPortFrom( diff --git a/scripts/install.sh b/scripts/install.sh index ef7543a7..40eafa90 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -183,6 +183,7 @@ Requires=uncloud.service [Service] Type=simple ExecStart=${INSTALL_BIN_DIR}/uncloud-corrosion agent -c ${UNCLOUD_DATA_DIR}/corrosion/config.toml +ExecReload=${INSTALL_BIN_DIR}/uncloud-corrosion reload -c ${UNCLOUD_DATA_DIR}/corrosion/config.toml Restart=always RestartSec=2 User=${UNCLOUD_USER}