diff --git a/.gitea/workflows/deploy_call.yaml b/.gitea/workflows/deploy_call.yaml index 7f4806f..347438b 100644 --- a/.gitea/workflows/deploy_call.yaml +++ b/.gitea/workflows/deploy_call.yaml @@ -44,8 +44,8 @@ jobs: - name: Build Go binaries run: | cd app - GOOS=linux GOARCH=amd64 go build -o ../wgrplane-linux-amd64 . - GOOS=linux GOARCH=arm64 go build -o ../wgrplane-linux-arm64 . + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../wgrplane-linux-amd64 . + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ../wgrplane-linux-arm64 . - name: Generate latest.json run: | diff --git a/README.md b/README.md index ab62bb2..03d6612 100644 --- a/README.md +++ b/README.md @@ -355,19 +355,36 @@ cd ../.. # Server starts on :10087 ``` -### Option 4: Systemd Service +### Option 4: Native CLI / Systemd Service + +The WGRplane binary includes a built-in CLI to manage its own systemd service. ```bash -# Install service file -sudo cp wgrplane.service /etc/systemd/system/ -sudo systemctl daemon-reload -sudo systemctl enable wgrplane.service -sudo systemctl start wgrplane.service +# Check system dependencies first +./wgrplane doctor + +# Install as systemd service (auto-creates unit, enables, and starts) +sudo ./wgrplane install # View logs -journalctl -u wgrplane.service -f +journalctl -u wgrplane -f + +# Other available commands: +sudo ./wgrplane stop +sudo ./wgrplane restart +sudo ./wgrplane uninstall ``` +### Manual Serve & Config + +To run the server manually in the foreground with custom ports: + +```bash +./wgrplane serve --port 8080 --host 127.0.0.1 +``` + +On first run, it generates a default configuration file at `~/.config/wgrplane/config.json`. + --- ## 📁 Project Structure diff --git a/app b/app index 57ffe45..6ee3191 160000 --- a/app +++ b/app @@ -1 +1 @@ -Subproject commit 57ffe45ab7f53f35e03923737b31dc0d6294df77 +Subproject commit 6ee319150081ea56afc28d7664b6b96412e331d9