feat: add vector addon
This commit is contained in:
23
vector/rootfs/etc/s6-overlay/s6-rc.d/init-vector/run
Normal file
23
vector/rootfs/etc/s6-overlay/s6-rc.d/init-vector/run
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# shellcheck disable=SC2207
|
||||
# ==============================================================================
|
||||
# Home Assistant Add-on: Vector
|
||||
# Copy default config
|
||||
# ==============================================================================
|
||||
|
||||
CONFIG_PATH="/config/vector.yaml"
|
||||
DEFAULT_CONFIG="/vector.yaml"
|
||||
|
||||
if ! bashio::fs.file_exists "$CONFIG_PATH"; then
|
||||
bashio::log.info "Copying default configuration from $DEFAULT_CONFIG"
|
||||
|
||||
if cp "$DEFAULT_CONFIG" "$CONFIG_PATH"; then
|
||||
bashio::log.info "Default configuration copied successfully"
|
||||
else
|
||||
bashio::log.error "Failed to copy default configuration!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
bashio::log.info "Using existing configuration at $CONFIG_PATH"
|
||||
fi
|
||||
1
vector/rootfs/etc/s6-overlay/s6-rc.d/init-vector/type
Normal file
1
vector/rootfs/etc/s6-overlay/s6-rc.d/init-vector/type
Normal file
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
1
vector/rootfs/etc/s6-overlay/s6-rc.d/init-vector/up
Normal file
1
vector/rootfs/etc/s6-overlay/s6-rc.d/init-vector/up
Normal file
@@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-vector/run
|
||||
Reference in New Issue
Block a user