diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | conf.d/etc/xds/agent/agent-config.json (renamed from conf.d/etc/xds-agent/agent-config.json) | 0 | ||||
-rw-r--r-- | conf.d/usr/lib/systemd/user/xds-agent.service | 2 | ||||
-rw-r--r-- | lib/agent/agent.go | 2 | ||||
-rw-r--r-- | lib/syncthing/st.go | 2 | ||||
-rw-r--r-- | lib/xdsconfig/configfile.go | 4 | ||||
-rwxr-xr-x | scripts/install.sh | 2 |
7 files changed, 7 insertions, 7 deletions
@@ -158,7 +158,7 @@ package: clean tools/syncthing vendor build ifneq ($(GOOS), windows) @cp -r $(ROOT_SRCDIR)/conf.d $(ROOT_SRCDIR)/scripts $(PACKAGE_DIR)/$(TARGET)/ endif - @cp $(ROOT_SRCDIR)/conf.d/etc/xds-agent/agent-config.json $(PACKAGE_DIR)/$(TARGET)/agent-config.json.in + @cp $(ROOT_SRCDIR)/conf.d/etc/xds/agent/agent-config.json $(PACKAGE_DIR)/$(TARGET)/agent-config.json.in @cd $(PACKAGE_DIR) && zip -r $(ROOT_SRCDIR)/$(PACKAGE_ZIPFILE) ./$(TARGET) @echo "### Package $(PACKAGE_ZIPFILE) has been successfuly built - $(BUILD_MODE)" diff --git a/conf.d/etc/xds-agent/agent-config.json b/conf.d/etc/xds/agent/agent-config.json index 1a7957e..1a7957e 100644 --- a/conf.d/etc/xds-agent/agent-config.json +++ b/conf.d/etc/xds/agent/agent-config.json diff --git a/conf.d/usr/lib/systemd/user/xds-agent.service b/conf.d/usr/lib/systemd/user/xds-agent.service index 1fd038b..6db084d 100644 --- a/conf.d/usr/lib/systemd/user/xds-agent.service +++ b/conf.d/usr/lib/systemd/user/xds-agent.service @@ -3,7 +3,7 @@ Description=XDS Agent [Service] EnvironmentFile=-/etc/default/xds-agent -ExecStart=/opt/AGL/xds/agent/xds-agent & +ExecStart=/opt/AGL/xds/agent/xds-agent [Install] WantedBy=multi-user.target diff --git a/lib/agent/agent.go b/lib/agent/agent.go index 58a2ba0..a562e77 100644 --- a/lib/agent/agent.go +++ b/lib/agent/agent.go @@ -132,7 +132,7 @@ func (ctx *Context) Run() (int, error) { ctx._logPrint("Logging file for HTTP requests: %s\n", logFileHTTPReq) } - // Create syncthing instance when section "syncthing" is present in config.json + // Create syncthing instance when section "syncthing" is present in agent-config.json if ctx.Config.FileConf.SThgConf != nil { ctx.SThg = st.NewSyncThing(ctx.Config, ctx.Log) } diff --git a/lib/syncthing/st.go b/lib/syncthing/st.go index ac1e99d..c4b72c5 100644 --- a/lib/syncthing/st.go +++ b/lib/syncthing/st.go @@ -278,7 +278,7 @@ func (s *SyncThing) Start() (*exec.Cmd, error) { */ s.STCmd, err = s.startProc("syncthing", args, env, &s.exitSTChan) - // Use autogenerated apikey if not set by config.json + // Use autogenerated apikey if not set by agent-config.json if err == nil && s.APIKey == "" { if fd, err := os.Open(filepath.Join(s.Home, "config.xml")); err == nil { defer fd.Close() diff --git a/lib/xdsconfig/configfile.go b/lib/xdsconfig/configfile.go index 71870d0..c252073 100644 --- a/lib/xdsconfig/configfile.go +++ b/lib/xdsconfig/configfile.go @@ -55,7 +55,7 @@ type FileConfig struct { // Order to determine which config file is used: // 1/ from command line option: "--config myConfig.json" // 2/ $HOME/.xds/agent/agent-config.json file -// 3/ /etc/xds-agent/config.json file +// 3/ /etc/xds/agent/agent-config.json file func readGlobalConfig(c *Config, confFile string) error { @@ -67,7 +67,7 @@ func readGlobalConfig(c *Config, confFile string) error { searchIn = append(searchIn, path.Join(homeDir, ".xds", "agent", "agent-config.json")) } - searchIn = append(searchIn, "/etc/xds-agent/agent-config.json") + searchIn = append(searchIn, "/etc/xds/agent/agent-config.json") var cFile *string for _, p := range searchIn { diff --git a/scripts/install.sh b/scripts/install.sh index 10fc59f..444dc1b 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -28,7 +28,7 @@ install() { mkdir -p "${DESTDIR}" && cp "${ROOT_SRCDIR}/bin/*" "${DESTDIR}" || exit 1 mkdir -p "${DESTDIR_WWW}" && cp -a "${ROOT_SRCDIR}/webapp/dist/*" "${DESTDIR_WWW}" || exit 1 - cp "${ROOT_SRCDIR}/conf.d/etc/xds-agent" /etc/ || exit 1 + cp -a "${ROOT_SRCDIR}/conf.d/etc/xds" /etc/ || exit 1 cp "${ROOT_SRCDIR}/conf.d/etc/default/xds-agent" /etc/default/ || exit 1 FILE=/etc/profile.d/xds-agent.sh |