#!/bin/sh # llmsproxy core package postinst set -e # Runtime state belongs under /etc/llmsproxy just like the production layout: # runtime.json holds keys/created sources and is NOT touched on reinstall. mkdir -p /etc/llmsproxy/adapters if [ -f /etc/llmsproxy/config.yaml ]; then echo "llmsproxy: keeping existing /etc/llmsproxy/config.yaml" else # Do NOT seed a starter config here. Packaging/installing one used to hand # everyone the same file, and while it was copied from the maintainer's # live config it shipped a real, working admin key (sk-gw-local-0001) to # every install. # # Instead, leave the file absent: on first start the binary's EnsureDefault # path creates config.yaml with a FRESH RANDOM admin key and logs it, which # is both unique per install and actually usable. The packaged # config.example.yaml stays in /usr/share as a reference template only. # # (Seeding it with gateway_keys: [] would be worse: the gateway would start # but reject every request, with no way in except editing the file.) echo "llmsproxy: no /etc/llmsproxy/config.yaml — a random admin key will be generated on first start" fi # systemd if command -v systemctl >/dev/null 2>&1; then systemctl daemon-reload >/dev/null 2>&1 || true echo "llmsproxy: use 'systemctl enable --now llmsproxy' to start" fi exit 0