smart_ide/scripts/install-systemd-services.sh
Nicolas Cantu 088eab84b7 Platform docs, services, ia_dev submodule, smart_ide project config
- Add ia_dev submodule (projects/smart_ide on forge 4nk)
- Document APIs, orchestrator, gateway, local-office, rollout
- Add systemd/scripts layout; relocate setup scripts
- Remove obsolete nginx/enso-only docs from this repo scope
2026-04-03 16:07:58 +02:00

28 lines
944 B
Bash
Executable File

#!/bin/bash
# Install AnythingLLM systemd unit and helper script. Ollama is managed by the official
# ollama.service (this script only ensures it is enabled).
# Run: sudo ./install-systemd-services.sh
set -euo pipefail
if [ "$(id -u)" -ne 0 ]; then
echo "Run as root: sudo $0" >&2
exit 1
fi
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
install -m 0755 "${ROOT}/scripts/anythingllm-docker-exec.sh" /usr/local/sbin/anythingllm-docker-exec.sh
install -m 0644 "${ROOT}/systemd/anythingllm.service" /etc/systemd/system/anythingllm.service
if [ ! -f /etc/default/anythingllm ]; then
install -m 0644 "${ROOT}/systemd/anythingllm.default" /etc/default/anythingllm
fi
systemctl daemon-reload
systemctl enable ollama.service
systemctl enable anythingllm.service
systemctl restart ollama.service
systemctl restart anythingllm.service
echo "Status ollama: $(systemctl is-active ollama)"
echo "Status anythingllm: $(systemctl is-active anythingllm)"