mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-18 21:39:12 +02:00
Add NetBird server add-on
This commit is contained in:
23
netbird-server/rootfs/etc/services.d/management/run
Normal file
23
netbird-server/rootfs/etc/services.d/management/run
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -euo pipefail
|
||||
|
||||
# ==============================================================================
|
||||
# Home Assistant Add-on: NetBird Server
|
||||
# Runs the NetBird Management service
|
||||
# ==============================================================================
|
||||
|
||||
DATA_DIR=$(bashio::config 'data_dir')
|
||||
LOG_LEVEL=$(bashio::config 'log_level')
|
||||
MANAGEMENT_CONFIG="$DATA_DIR/management/management.json"
|
||||
|
||||
if [[ ! -f "$MANAGEMENT_CONFIG" ]]; then
|
||||
bashio::log.error "Missing management configuration at ${MANAGEMENT_CONFIG}."
|
||||
bashio::exit.nok
|
||||
fi
|
||||
|
||||
bashio::log.info "Starting NetBird Management..."
|
||||
exec /usr/local/bin/netbird-mgmt management \
|
||||
--config "$MANAGEMENT_CONFIG" \
|
||||
--log-level "$LOG_LEVEL" \
|
||||
--log-file console
|
||||
Reference in New Issue
Block a user