mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-11-04 03:42:14 +00:00
* add letta_code addon * address pr review comments * tweak env_vars regex and readme port note * drop nginx, wrap upstream entrypoint, simplify build * secure system cron paths and doc bearer auth * persist cron paths in config with non-root sanitization * letta_code: drop PUID/PGID and the cron sanitizer, run as root like upstream The non-root branch rewrote cron field 6 root->node, which misses @reboot/@daily lines (user is field 2) and mapped to node, not PUID. Upstream's entrypoint installs cron and starts it as root before gosu anyway. Run as root like the upstream image: drop gosu, the PUID/PGID options, the recursive chown and the extra cron dirs (the entrypoint creates them under ~/.letta, linked to /config/.letta). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * letta_code: drop trailing blank line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: BirdNET-Go Addon Builder <addon-builder@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.2 KiB
Bash
Executable File
34 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/with-contenv bashio
|
|
# shellcheck shell=bash
|
|
set -e
|
|
|
|
# Letta Code stores its database, MemFS, credentials, and settings in ~/.letta
|
|
# and works on repositories/files in the workspace directory.
|
|
# Both are persisted in /config (the addon_config mount) so state is retained across updates.
|
|
|
|
bashio::log.info "Configuring persistent storage in /config..."
|
|
|
|
mkdir -p /config/.letta /config/workspace
|
|
|
|
if [ ! -L /root/.letta ]; then
|
|
rm -rf /root/.letta
|
|
ln -s /config/.letta /root/.letta
|
|
fi
|
|
|
|
if [ ! -L /workspace ]; then
|
|
rm -rf /workspace
|
|
ln -s /config/workspace /workspace
|
|
fi
|
|
|
|
# App server capability token configuration
|
|
if bashio::config.has_value 'token'; then
|
|
bashio::log.info "Using configured App Server token from add-on options"
|
|
bashio::config 'token' > /config/app-server-token
|
|
chmod 600 /config/app-server-token
|
|
elif [ ! -f /config/app-server-token ]; then
|
|
bashio::log.info "No token configured. Generating secure random App Server token in /config/app-server-token"
|
|
openssl rand -hex 32 > /config/app-server-token
|
|
chmod 600 /config/app-server-token
|
|
bashio::log.notice "Generated token stored in /config/app-server-token"
|
|
fi
|