diff --git a/.github/workflows/docker-image-dev.yml b/.github/workflows/docker-image-dev.yml index 5bc2734f..6b11c9d1 100644 --- a/.github/workflows/docker-image-dev.yml +++ b/.github/workflows/docker-image-dev.yml @@ -198,6 +198,18 @@ jobs: yq -i ".name = \"${{ needs.setup.outputs.name }}\"" "$CONFIG_FILE" echo "Updated name to ${{ needs.setup.outputs.name }}" + - name: Ensure image key is uncommented in config.yaml + if: needs.setup.outputs.has_scripts == 'true' + shell: bash + run: | + CONFIG_FILE="./${{ needs.setup.outputs.addon_dir }}/config.yaml" + if grep -Eq '^\s*#\s*image\s*:' "$CONFIG_FILE"; then + sed -E -i 's/^([[:space:]]*)#[[:space:]]*(image[[:space:]]*:.*)$/\1\2/' "$CONFIG_FILE" + echo "Uncommented image key in $CONFIG_FILE" + else + echo "No commented image key found in $CONFIG_FILE" + fi + - name: Run Addon custom scripts if: needs.setup.outputs.has_scripts == 'true' env: diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index 2e7f4a28..66054dab 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -1,6 +1,122 @@ # Changelog -## 2026.5.0-rc6 +## 2026.7.0-rc11 + +### πŸ™ Thanks + +- Thanks to all the contributors and users that help to make this addon better. +- Special thanks to supporters and sponsors. With our support I was able to buy a copilot subscription to help me code faster and better. + +### 🚨 Notes +- This is a release candidate version, it may contain bugs and issues. Use it at your own risk. It is not recommended to use this version in production environments. +- This version is not compatible with the previous SambaNas addon, it is a complete rewrite and refactor of the addon. It is recommended to backup your configuration before updating to this version. +- This version is only tested with Home Assistant OS and Supervised installations. It may not work properly with Home Assistant Core or Container installations. +- ***Your existing configuration may be lost when updating to this version. Please backup your configuration before updating.*** + + +### 🐭 Features from SRAT [v2026.7.0-rc11](https://github.com/dianlight/srat) + +#### πŸ”§ Chore + +- **Migrate to TypeScript 7.0 RC** (Go-based `tsgo` compiler): + - Updated peer dependency to `typescript: ^7.0.1-rc` + - Updated `@typescript/native-preview` to `7.0.0-dev.20260701.1` + - Updated `tsconfig.json`, migration docs, and instruction files + - Patches `esModuleInterop` default and other TS 7.0 defaults + +#### ✨ Features + +- **HDIdle per-disk model** (Lab Mode feature): Replaced the global HDIdle + enable/disable toggle with a fully per-disk configuration model gated behind + Lab Mode (`experimental_lab_mode=true`). Key changes: + - **Per-disk enable/disable**: each physical disk has its own HDIdle record + (`enabled: yes|custom|no`); the service runs automatically when β‰₯1 disk is + enabled. The five global `Settings.hdidle_*` fields have been removed. + - **Dashboard suggestion badge**: HDDs that have not yet been configured show + an inline "Enable HDIdle?" badge in the disk I/O table (visible only in Lab + Mode). The badge provides **Ignore** (persists `suggestion_ignored=true`) + and **Enable** (navigates to the per-disk card in the Volumes page). + - **Non-rotational guard**: enabling HDIdle on an SSD/NVMe or a device with + unknown rotational type opens a confirm dialog; accepting persists + `force_enabled=true` so the warning does not repeat. The backend returns + HTTP 409 if the flag is missing, preventing accidental spindowns of SSDs. + - **Rotational detection**: `Disk.is_rotational` tri-state (HDD/SSD/unknown) + is now derived from `/sys/block//queue/rotational` (sysfs primary) with + SMART `rotation_rate` as fallback. Unknown (e.g. USB enclosures) returns + `nil` β€” treated as non-rotational for safety. + - **Ignore-suggestion endpoint**: `POST /api/disk/{id}/hdidle/ignore-suggestion` + persists the badge dismissal per disk. + - **Adaptive polling**: the monitor goroutine polls every 60s when β‰₯1 disk is + spun-up and slows to 5min when all monitored disks are already spun-down. + The goroutine is never started when zero disks are enabled. + - **readOnly threading**: the per-disk settings card now correctly propagates + the `readOnly` flag from `VolumeDetailsPanel`. +- **mDNS Registration**: Added optional mDNS registration of the SRAT service for local network discovery. When enabled, the backend registers a `_srat._tcp` service with the system mDNS responder, advertising the service name, port, and metadata. This allows compatible clients to discover the SRAT service on the local network without manual configuration. The feature is controlled by a new `MDNSRegistration` boolean setting in the advanced settings section. + +#### πŸ› Bug Fixes + +- **HDIdle service permanently broken after first Stop()**: `Stop()` no longer + leaves `stopChan` non-nil after close. Subsequent `Start()` calls now succeed + (idempotent). Fixes a latent bug where the service refused to restart after + any config PUT. +- **Nested mutex deadlock** in `GetDeviceStatus`, `GetProcessStatus`, and + `observeDiskActivity`: calls to `IsRunning()` under an existing lock now read + `stopChan` directly to avoid the deadlock inherent in re-acquiring an + `RWMutex` that is not guaranteed reentrant. +- **`GetDeviceConfig` returned HTTP 500 when service disabled**: the guard + `!s.config.Enabled β†’ ErrorHDIdleNotSupported` has been removed. The config + endpoint is now always available for inspection/configuration regardless of + whether the monitor goroutine is running. +- **`disk_id` injected unsanitised into file path**: `hdidle_handler.go` was + naΓ―vely prefixing every `disk_id` with `/dev/disk/by-id/` without validation. + Replaced by `HDIdleServiceInterface.ResolveDevicePath()` which probes three + candidate paths (absolute `/dev/…`, by-id, kernel name) and rejects inputs + containing path-traversal characters. + +#### πŸ”„ Breaking Changes + +- `Settings.hdidle_enabled`, `hdidle_default_idle_time`, `hdidle_default_command_type`, + `hdidle_default_power_condition`, and `hdidle_ignore_spin_down_detection` have + been **removed** from the API and the DB (migration 00017 drops the + corresponding rows from the `properties` table). +- `POST /api/hdidle/start` and `POST /api/hdidle/stop` have been **removed**. + The service lifecycle is now fully automatic (driven by the per-disk records). +- `PATCH /api/disk/{id}/hdidle/config` has been **removed** (it was a dead spec + entry with no handler). + +#### πŸ— Chore + +- DB migration `00017` (`drop_global_hdidle_properties`): deletes the five + obsolete global HDIdle property rows. Down migration re-seeds them with their + original defaults for dev/test rollback. +- `events.PowerEvent` now carries a `Kind PowerEventKind` discriminant field + (`config` or `status`) so subscribers can branch without comparing zero-values. +- Two new `dto.HDIdleDevice` fields (`SuggestionIgnored`, `ForceEnabled`) and + matching GORM/generated-layer/converter updates. Schema columns are added by + GORM `AutoMigrate` on the next startup β€” no manual migration needed. +- `openapi.json` is **not regenerated** in this branch β€” it requires a working + Go toolchain and `go run ./cmd/srat-openapi`. **CI must run** + `go run ./cmd/srat-openapi -dir=backend/docs` and + `cd frontend && bun run gen:api` before merging to keep generated artifacts in + sync. Three hand-edited generated files (`config_to_dto_conv_gen.go`, + `dto_to_dbom_conv_gen.go`, `g/hdidle_device_config.go`) are aligned with their + source directives β€” a `go generate ./...` run will produce the same output. + +#### πŸ”§ Maintenance + +- **Multi-variant server release**: Release archives now ship three `srat-server` variants β€” `srat-server-static` (fully static, zero shared-library dependencies), `srat-server-musl` (dynamic linked against musl libc, built via Zig), and `srat-server-glib` (dynamic linked against glibc, built via CGO). The `srat-server` entry in the archive is a symlink that defaults to `srat-server-static`; the upgrade process automatically updates it to the best available variant for the running system (musl β†’ glibc β†’ static). `srat-openapi` is no longer included in release archives. `srat-cli` is always statically linked. + + +## 2026.6.0-rc10 + +### πŸ— Chore +- Update SRAT to v2026.6.0-rc10 +- Update Base image to v21.0.0 (Alpine base image to v3.24.0) + +### ✨ Features +- New 'Lab Mode' setting in Settings β†’ General section to enable experimental features and configurations for advanced users and testers. When enabled, this setting allows access to features that are still in development or testing phases, providing early access to new functionality while clearly indicating that these features may be unstable or subject to change. + +## 2026.5.0-rc9 ### πŸ™ Thanks @@ -11,11 +127,35 @@ - This is a release candidate version, it may contain bugs and issues. Use it at your own risk. It is not recommended to use this version in production environments. - This version is not compatible with the previous SambaNas addon, it is a complete rewrite and refactor of the addon. It is recommended to backup your configuration before updating to this version. - This version is only tested with Home Assistant OS and Supervised installations. It may not work properly with Home Assistant Core or Container installations. -- ***Your existing configuration will be lost when updating to this version. Please backup your configuration before updating.*** +- ***Your existing configuration may be lost when updating to this version. Please backup your configuration before updating.*** - ***If you need HDIdle support don't update and wait future releases.*** - ***If you need Avahi/mDNS support don't update and wait future releases.*** -#### πŸ— Chore +### πŸ— Chore +- Update SRAT to v2026.5.0-rc9 + +### ✨ Features +- Install [smartmontools-sdk v7.5](https://github.com/dianlight/smartmontools-sdk) (`libsmartmon.a` + headers) providing in-process SMART device access without spawning a subprocess +- Set `LIBRARY_PATH` and `CPATH` environment variables for all container processes so that components linking against `libsmartmon` are automatically found +- Register `/etc/profile.d/smartmontools-sdk.sh` so interactive login shells also inherit the correct library and include paths + +## 2026.5.0-rc8 + +### πŸ— Chore +- Update SRAT to v2026.5.0-rc8 + +## 2026.5.0-rc7 + +### πŸ— Chore +- Update SRAT to v2026.5.0-rc7 +- Update homeassistant client to 5.1.0 + +### ✨ Features +- Add a allert when Protected Mode is enabled in Home Assistant (See [DOCS](DOCS.md) ) + +## 2026.5.0-rc6 + +### πŸ— Chore - Update SRAT to v2026.5.0-rc6 ## 2026.5.0-rc5 diff --git a/sambanas2/DOCS.md b/sambanas2/DOCS.md index 0a745bfb..56ce8e26 100644 --- a/sambanas2/DOCS.md +++ b/sambanas2/DOCS.md @@ -18,11 +18,12 @@ The following table compares the major functionalities available in SambaNAS and |------------------------------------|:--------:|:---------:| | **Network Sharing** | | | | CIFS Volume Exporting | βœ”οΈ | βœ”οΈ | -| NFS Volume Exporting | ❌ | πŸ§ͺ πŸ”Œ (internal HA-addon use only) | +| NFS Volume Exporting | ❌ | πŸ§ͺ πŸ”Œ | | SMB Multichannel Support | βœ”οΈ | βœ”οΈ | | WSDD and WSDD2 Integration | βœ”οΈ | ❌ | | WSDD-Native | ❌ | βœ”οΈ | -| Avahi/mDNS Support | βœ”οΈ | 🚧 Soon (via component) | +| Avahi/mDNS Support | βœ”οΈ | ❌ | +| HA mDNS Support | ❌ | πŸ§ͺ (via component) | | Samba over QUIC Support | ❌ | πŸ§ͺ πŸ”Œ | | **Volume Management** | | | | Mounting additional volumes | βœ”οΈ | βœ”οΈ | @@ -43,14 +44,14 @@ The following table compares the major functionalities available in SambaNAS and | **Integration** | | | | MQTT integration | βœ”οΈ | ❌ | | HA Native API Integration | ❌ | βœ”οΈ | -| Component Integration | ❌ | 🚧 Soon | +| Component Integration | ❌ | πŸ§ͺ (limited) | | **Disk Management** | | | | SMART Monitoring | βœ”οΈ | βœ”οΈ | | SMART Test Support | ❌ | βœ”οΈ | -| Disk Spindown Support | βœ”οΈ | 🚧 Soon | -| Per Disk Spindown Support | ❌ | 🚧 Soon | +| Disk Spindown Support | βœ”οΈ | πŸ§ͺ | +| Per Disk Spindown Support | ❌ | πŸ§ͺ | | **Filesystem Support** | | | -| Filesystem Checking | ❌ | 🚧 Soon | +| Filesystem Checking | ❌ | βœ”οΈ | | Advanced XFS Support | ❌ | 🚧 Soon | | Advanced BTRFS Support | ❌ | 🚧 Soon | | Advanced ZFS Support | ❌ | 🚧 Soon | @@ -58,7 +59,7 @@ The following table compares the major functionalities available in SambaNAS and | External Kernel Modules Support | ❌ | βœ”οΈ | -> βœ”οΈ = Supportedβ€ƒβ€ƒβŒ = Not Supported  πŸ§ͺ = Experimentalβ€ƒβ€ƒπŸ”Œ = Only with extra kernel modules (see hasos_more_modules)β€ƒβ€ƒπŸš§ Soon = Coming in future versionsβ€ƒβ€ƒπŸ”š EOL = End of Life +> βœ”οΈ = Supportedβ€ƒβ€ƒβŒ = Not Supported  πŸ§ͺ = Experimental (Lab Mode)β€ƒβ€ƒπŸ”Œ = Only with extra kernel modules (see hasos_more_modules)β€ƒβ€ƒπŸš§ Soon = Coming in future versionsβ€ƒβ€ƒπŸ”š EOL = End of Life ## Installation @@ -140,6 +141,24 @@ NFS services run under s6 supervision and the exports file is **automatically ma - πŸ”Œ Depending on your HAOS architecture/board, NFS functionality may require enabling `use_external_kernel_modules` to load extra kernel modules - Changes made through SRAT are applied automatically without requiring an add-on restart +## SMART Monitoring and Disk Health + +Samba NAS2 bundles the **[smartmontools-sdk](https://github.com/dianlight/smartmontools-sdk)** (`libsmartmon`) so that SMART queries are performed **in-process** β€” no subprocess is spawned to run `smartctl`. This provides: + +- Faster and more efficient disk health queries +- Unified ATA/SATA, NVMe, and SCSI/SAS device support via a single native API +- Structured JSON output for integration with the SRAT web interface + +The SDK is installed at build time: + +| Path | Contents | +|---|---| +| `/usr/local/lib/libsmartmon.a` | Pre-built static library (smartmontools v7.5) | +| `/usr/local/include/smartmon/` | Public C++ headers | + +`LIBRARY_PATH` and `CPATH` environment variables are automatically exported to all container processes and interactive shells so any component linking against `libsmartmon` finds the library without manual configuration. + + ## Configuration Example configuration with all available options and their default values: diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index e4c8352c..d921825d 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base:20.1.0 +ARG BUILD_FROM=ghcr.io/hassio-addons/base:21.0.0 ARG BUILD_DATE="" ARG BUILD_DESCRIPTION="" ARG BUILD_NAME="" @@ -6,7 +6,7 @@ ARG BUILD_REF="" ARG BUILD_REPOSITORY="dianlight/hassio-addons" ARG BUILD_VERSION="" ARG SAMBA_VERSION=distribution -ARG HA_CLI_VERSION=5.0.0 +ARG HA_CLI_VERSION=5.1.0 # QUIC Builder Stage (only if SAMBA_VERSION is not "distribution") # hadolint ignore=DL3006 @@ -151,13 +151,16 @@ ENV \ S6_CMD_WAIT_FOR_SERVICES=1 \ S6_KILL_GRACETIME=30000 \ S6_SYNC_DISKS=1 \ + CPATH="/usr/local/include" \ + LIBRARY_PATH="/usr/local/lib" \ TERM="xterm-256color" # Setup base ARG BUILD_ARCH=amd64 -ARG HA_CLI_VERSION=5.0.0 -ARG SRAT_VERSION=2026.5.0-rc6 +ARG HA_CLI_VERSION=5.1.0 +ARG SRAT_VERSION=2026.7.0-rc11 ARG SAMBA_VERSION=distribution +ARG SMARTMONTOOLS_SDK_VERSION=7.5 # Copy compiled binaries from builder stages #COPY --from=builder_wsdd /usr/sbin/wsdd2 /usr/sbin/ @@ -290,6 +293,16 @@ RUN wget -qO- https://www.gershnik.com/alpine-repo/gershnik@hotmail.com-6643812 RUN curl -fsSL -o /usr/bin/ha "https://github.com/home-assistant/cli/releases/download/${HA_CLI_VERSION}/ha_${BUILD_ARCH}" \ && chmod a+x /usr/bin/ha +# Download and install smartmontools-sdk +RUN curl -fsSL -o /tmp/smartmontools-sdk.tar.gz \ + "https://github.com/dianlight/smartmontools-sdk/releases/download/v${SMARTMONTOOLS_SDK_VERSION}/libsmartmon-${SMARTMONTOOLS_SDK_VERSION}-linux-${BUILD_ARCH}-musl.tar.gz" \ + && tar -xzf /tmp/smartmontools-sdk.tar.gz -C /usr/local \ + && rm -f /tmp/smartmontools-sdk.tar.gz \ + && printf '%s\n' \ + 'export LIBRARY_PATH="/usr/local/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"' \ + 'export CPATH="/usr/local/include${CPATH:+:$CPATH}"' \ + > /etc/profile.d/smartmontools-sdk.sh + # Download and install SRAT RUN SRAT_ARCH_SUFFIX="${BUILD_ARCH}"; \ if [ "${BUILD_ARCH}" = "amd64" ]; then \ diff --git a/sambanas2/build.yaml b/sambanas2/build.yaml deleted file mode 100644 index 985bd30d..00000000 --- a/sambanas2/build.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -build_from: - aarch64: ghcr.io/hassio-addons/base:20.1.0 - amd64: ghcr.io/hassio-addons/base:20.1.0 -#cosign: -# #base_identity: https://github.com/home-assistant/builder/.* -# identity: https://github.com/dianlight/hassio-addons/.* -args: - HA_CLI_VERSION: "5.0.0" - SRAT_VERSION: "2026.4.0-rc2" - SAMBA_VERSION: "distribution" #"4.23.1" # Use "distribution" or "edge" to use precompiled packages from version or edge branch diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index 4cb4e2f0..89e14db8 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -1,6 +1,6 @@ --- name: Samba NAS2 -version: 2026.5.0-rc6 +version: 2026.7.0-rc11 slug: sambanas2 description: Expose Home Assistant disc with SMB/CIFS url: https://github.com/dianlight/hassio-addons/tree/master/sambanas2 @@ -29,10 +29,9 @@ ingress_port: 0 # For add-ons on host network ingress_entry: index.html ingress_stream: true panel_icon: mdi:folder-network -panel_title: Samba NAS2 +#panel_title: Samba NAS2 panel_admin: true discovery: ["srat"] - boot: auto init: false hassio_api: true diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/dependencies.d/base b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/dependencies.d/base new file mode 100644 index 00000000..e69de29b diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run new file mode 100755 index 00000000..641047a2 --- /dev/null +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run @@ -0,0 +1,74 @@ +#!/command/with-contenv bashio +# shellcheck shell=bash +# vim: ft=bash +# ============================================================================== +# Check Protection Mode - One-time startup check +# Warns the user (log banner + HA persistent notification) when Protection Mode +# is enabled, since this add-on requires it to be OFF for full functionality. +# ============================================================================== +set -euo pipefail +exec 2>&1 +trap 'bashio::log.error "check-protection-mode/run failed at line ${BASH_LINENO[0]} (exit code: ${?})"' ERR + +# bashio::addon.protected always returns exit 0 and *prints* "true"/"false". +# Capture the output and test with bashio::var.true (same pattern used by +# bashio::require.protected / bashio::require.unprotected internally). +protected="$(bashio::addon.protected)" + +# ── Nothing to do when protection mode is already disabled ─────────────────── +if bashio::var.false "${protected}"; then + bashio::log.debug "Protection mode is disabled. Full functionality available." + exit 0 +fi + +# ── Warning banner in the add-on log ───────────────────────────────────────── +bashio::log.yellow "╔══════════════════════════════════════════════════════════════════════════════╗" +bashio::log.yellow "β•‘ β•‘" +bashio::log.yellow "β•‘ ⚠️ WARNING: PROTECTION MODE IS ENABLED ⚠️ β•‘" +bashio::log.yellow "β•‘ β•‘" +bashio::log.yellow "β•‘ Samba NAS2 requires Protection Mode to be DISABLED for full functionality. β•‘" +bashio::log.yellow "β•‘ β•‘" +bashio::log.yellow "β•‘ The following features will NOT work while Protection Mode is active: β•‘" +bashio::log.yellow "β•‘ β€’ Mounting external disks (MoreDisks / Automount) β•‘" +bashio::log.yellow "β•‘ β€’ NFS server support β•‘" +bashio::log.yellow "β•‘ β€’ Kernel module loading (modprobe) β•‘" +bashio::log.yellow "β•‘ β€’ Some SMB operations requiring elevated privileges β•‘" +bashio::log.yellow "β•‘ β•‘" +bashio::log.yellow "β•‘ To fix: Settings β†’ Add-ons β†’ Samba NAS2 β†’ Info β†’ disable Protection mode β•‘" +bashio::log.yellow "β•‘ β•‘" +bashio::log.yellow "β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•" + +# ── Persistent notification in Home Assistant UI ────────────────────────────── +bashio::log.info "Sending protection mode warning to Home Assistant notifications..." + +readonly NOTIFICATION_ID="sambanas2_protection_mode_warning" +readonly NOTIFICATION_TITLE="⚠️ Samba NAS2: Protection Mode Enabled" +readonly NOTIFICATION_MESSAGE="**Samba NAS2** is running with **Protection Mode enabled**. +This prevents several features from working correctly. + +### Features that will NOT work: +- Mounting external disks (MoreDisks / Automount) +- NFS server support +- Kernel module loading +- Some SMB operations requiring elevated privileges + +### How to fix: +1. Go to **Settings β†’ Add-ons β†’ Samba NAS2** +2. Click the **Info** tab +3. Toggle **OFF** the *Protection mode* switch +4. Restart the add-on" + +notification_payload=$(jq -cn \ + --arg id "${NOTIFICATION_ID}" \ + --arg title "${NOTIFICATION_TITLE}" \ + --arg msg "${NOTIFICATION_MESSAGE}" \ + '{notification_id: $id, title: $title, message: $msg}') || { + bashio::log.warning "Failed to build notification JSON payload; skipping HA notification." + exit 0 +} + +bashio::api.supervisor POST /core/api/services/persistent_notification/create \ + "${notification_payload}" \ + || bashio::log.warning "Could not create HA persistent notification (non-critical). Check logs." + +bashio::log.info "Protection mode check complete." diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/type b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/type new file mode 100644 index 00000000..bdd22a18 --- /dev/null +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/type @@ -0,0 +1 @@ +oneshot diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/up b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/up new file mode 100644 index 00000000..b0731aba --- /dev/null +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/check-protection-mode/run diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run index 0c12f1ad..3be52273 100755 --- a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run @@ -9,10 +9,9 @@ exec 2>&1 trap 'bashio::log.error "socat/run failed at line ${BASH_LINENO[0]} (exit code: ${?})"' ERR if bashio::var.has_value "$(bashio::addon.port 3000)"; then - bashio::log.warning "$(figlet -p -f big -w 600 'ALLERT!')" + bashio::log.yellow "$(figlet -p -f big -w 600 'ALLERT!')" bashio::log.warning "Addon OPEN ACCESS PORT port is set to $(bashio::addon.port 3000)->$(bashio::addon.ingress_port)" exec socat TCP-LISTEN:$(bashio::addon.port 3000),fork TCP:127.0.0.1:$(bashio::addon.ingress_port) else exec sleep infinity fi - diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/check-protection-mode b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/check-protection-mode new file mode 100644 index 00000000..e69de29b