feat: add systemd installation

This commit is contained in:
2025-05-06 13:40:55 +02:00
parent 3bbb689cac
commit c2b483d20d
6 changed files with 56 additions and 27 deletions

View File

@@ -13,6 +13,16 @@ A simple daemon and REST API to manage:
- systemd
- Linux operating system
## Installation
In order to install `rcond`as a systemd service, you need to specify the target architecture and then run the build and install make targets.
```sh
export ARCH=arm64
make build
make install
```
## Build and Run
```bash
@@ -20,6 +30,34 @@ make build
make run
```
## Develop
```sh
make dev
```
## Configuration
### File
The default config file location is `/etc/rcond/config.yaml`.
It can be overwritten by environment variables and flags.
An full example configuration with comments can be found in `config/rcond.yaml`
Example configuration:
```yaml
rcond:
addr: 0.0.0.0:8080
api_token: 1234567890
```
### Environment Variables
| Environment Variable | Description | Default |
|----------------------|-----------------------------------------|---------------|
| RCOND_ADDR | Address to bind the HTTP server to. | 0.0.0.0:8080 |
| RCOND_API_TOKEN | API token to use for authentication. | N/A |
## API
The full API specification can be found in [api/rcond.yaml](api/rcond.yaml).
@@ -51,27 +89,6 @@ All endpoints except `/health` require authentication via an API token passed in
### Request/Response Format
All endpoints use JSON for request and response payloads.
## Configuration
### File
The default config file location is `/etc/rcond/config.yaml`.
It can be overwritten by environment variables and flags.
Example configuration:
```yaml
rcond:
addr: 0.0.0.0:8080
api_token: 1234567890
```
### Environment Variables
| Environment Variable | Description | Default |
|----------------------|-----------------------------------------|---------------|
| RCOND_ADDR | Address to bind the HTTP server to. | 0.0.0.0:8080 |
| RCOND_API_TOKEN | API token to use for authentication. | N/A |
## Examples
### Setup an Access Point