Expose Matter Server data at /data; fix scripts

Create a /data symlink to /opt/matter-server/data (remove existing symlink if present) and update the matter-server systemd ExecStart to use /data and /data/credentials so storage can be mounted externally. Also clean up step-ca install script formatting: fix sed -i spacing, collapse the while loop header, and normalize indentation for whiptail and step-ca command lines (no functional behavior changes).
This commit is contained in:
CanbiZ (MickLesk)
2026-03-25 08:46:01 +01:00
parent 8c47039d0f
commit adcb155210

View File

@@ -27,6 +27,12 @@ UV_PYTHON="3.12" setup_uv
msg_info "Setting up Matter Server"
mkdir -p /opt/matter-server/data/credentials
if [ -L /data ]; then
rm -f /data
fi
if [ ! -e /data ]; then
ln -s /opt/matter-server/data /data
fi
$STD uv venv /opt/matter-server/.venv
MATTER_VERSION=$(get_latest_github_release "matter-js/python-matter-server")
$STD uv pip install --python /opt/matter-server/.venv/bin/python "python-matter-server[server]==${MATTER_VERSION}"
@@ -51,7 +57,7 @@ After=network.target
[Service]
Type=simple
User=root
ExecStart=/opt/matter-server/.venv/bin/matter-server --storage-path /opt/matter-server/data --paa-root-cert-dir /opt/matter-server/data/credentials
ExecStart=/opt/matter-server/.venv/bin/matter-server --storage-path /data --paa-root-cert-dir /data/credentials
Restart=on-failure
RestartSec=5