From 87caf9a07051339c30c7f0e9fa6516f6bed0fea1 Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Sun, 7 Jun 2026 15:56:36 +0200 Subject: [PATCH 1/2] Fix in release pipeline with config file for linux packages --- .goreleaser.yml | 2 +- README.md | 17 ++++++++--------- service/linux/systemd.service | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 0fc72b7..8604e4b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -99,7 +99,7 @@ nfpms: contents: - src: service/linux/systemd.service dst: /lib/systemd/system/osctrld.service - - src: service/osctrld.yaml + - src: service/osctrld-sample.yaml dst: /etc/osctrld/osctrld.yaml type: config|noreplace diff --git a/README.md b/README.md index fb15a93..841f2a7 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ Full documentation for the osctrl project is available at [https://osctrl.net](h For this repository, the most useful starting points are: - [service/osctrld-sample.yaml](service/osctrld-sample.yaml) for a YAML configuration example. -- [service/osctrld.yaml](service/osctrld.yaml) and [service/osctrld.json](service/osctrld.json) for additional config examples. - [service/linux/systemd.service](service/linux/systemd.service) for Linux service deployment. - [service/darwin/net.osctrl.daemon.plist](service/darwin/net.osctrl.daemon.plist) for macOS launchd deployment. - [SECURITY.md](SECURITY.md) for vulnerability reporting and operator security guidance. @@ -171,7 +170,7 @@ COMMANDS: Validate configuration before launching: ```shell -osctrld check-config --config /etc/osctrld/config.yaml +osctrld check-config --config /etc/osctrld/osctrld.yaml ``` Generate a fresh config template: @@ -183,26 +182,26 @@ osctrld default-config Retrieve flags and certificates: ```shell -osctrld flags --config /etc/osctrld/config.yaml -osctrld cert --config /etc/osctrld/config.yaml +osctrld flags --config /etc/osctrld/osctrld.yaml +osctrld cert --config /etc/osctrld/osctrld.yaml ``` Enroll a node: ```shell -osctrld enroll --config /etc/osctrld/config.yaml +osctrld enroll --config /etc/osctrld/osctrld.yaml ``` Verify a node: ```shell -osctrld verify --config /etc/osctrld/config.yaml +osctrld verify --config /etc/osctrld/osctrld.yaml ``` Run in daemon mode: ```shell -osctrld service --config /etc/osctrld/config.yaml --interval 60 +osctrld service --config /etc/osctrld/osctrld.yaml --interval 60 ``` In daemon mode, osctrld will: @@ -219,14 +218,14 @@ In daemon mode, osctrld will: ```shell cp osctrld /opt/osctrld/ cp service/linux/systemd.service /etc/systemd/system/osctrld.service -cp service/osctrld-sample.yaml /etc/osctrld/config.yaml +cp service/osctrld-sample.yaml /etc/osctrld/osctrld.yaml systemctl daemon-reload systemctl enable osctrld systemctl start osctrld ``` -Edit `/etc/osctrld/config.yaml` with the correct osctrl URL, environment, secret, and local osquery paths before starting the service in production. +Edit `/etc/osctrld/osctrld.yaml` with the correct osctrl URL, environment, secret, and local osquery paths before starting the service in production. ### 🍎 macOS launchd diff --git a/service/linux/systemd.service b/service/linux/systemd.service index d063a0c..3a7ca06 100644 --- a/service/linux/systemd.service +++ b/service/linux/systemd.service @@ -11,7 +11,7 @@ Restart=on-failure RestartSec=10 WorkingDirectory=/opt/osctrld -ExecStart=/opt/osctrld/osctrld service --config=/etc/osctrld/service.yaml +ExecStart=/opt/osctrld/osctrld service --config=/etc/osctrld/osctrld.yaml # make sure log directory exists and owned by syslog PermissionsStartOnly=true From 06ead6c993cba21e0919310913ecff1153b2ab34 Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Sun, 7 Jun 2026 16:01:47 +0200 Subject: [PATCH 2/2] document for macOS --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 841f2a7..8be30d2 100644 --- a/README.md +++ b/README.md @@ -231,12 +231,14 @@ Edit `/etc/osctrld/osctrld.yaml` with the correct osctrl URL, environment, secre ```shell cp osctrld /usr/local/bin/ +mkdir -p /usr/local/etc/osctrld +cp service/osctrld-sample.yaml /usr/local/etc/osctrld/osctrld.yaml cp service/darwin/net.osctrl.daemon.plist /Library/LaunchDaemons/ launchctl load /Library/LaunchDaemons/net.osctrl.daemon.plist ``` -Edit the plist and configuration paths for your environment before loading the daemon. +Edit the plist so it points to your installed binary and `/usr/local/etc/osctrld/osctrld.yaml`, then update that configuration file for your environment before loading the daemon. ## 💻 Development