fix: update environment variables and logging configuration in service files

This commit is contained in:
2026-04-11 10:58:41 +08:00
parent 73eb938caa
commit e88d24c52d
2 changed files with 9 additions and 6 deletions
+3
View File
@@ -22,6 +22,9 @@ Native way to run as a persistent background service on Debian/Ubuntu.
2. Reload systemd: `sudo systemctl daemon-reload`
3. Enable and Start: `sudo systemctl enable --now llama-server`
- **Check health**: `sudo systemctl status llama-server`
- **View logs**:
- Real-time: `journalctl -u llama-server -f`
- Since boot: `journalctl -u llama-server -b`
---
@@ -4,8 +4,8 @@ After=network.target
[Service]
Type=simple
Environment="MODEL_PATH=/home/user/unsloth/Qwen3.5-0.8B-GGUF/Qwen3.5-0.8B-UD-Q4_K_XL.gguf"
Environment="MMPROJ_PATH=/home/user/unsloth/Qwen3.5-0.8B-GGUF/mmproj-BF16.gguf"
Environment="MODEL_PATH=%h/unsloth/Qwen3.5-0.8B-GGUF/Qwen3.5-0.8B-UD-Q4_K_XL.gguf"
Environment="MMPROJ_PATH=%h/unsloth/Qwen3.5-0.8B-GGUF/mmproj-BF16.gguf"
ExecStart=/usr/local/bin/llama-server \
--model ${MODEL_PATH} \
--mmproj ${MMPROJ_PATH} \
@@ -21,10 +21,10 @@ ExecStart=/usr/local/bin/llama-server \
--chat-template-kwargs '{"enable_thinking":false}'
Restart=always
RestartSec=5
User=user
WorkingDirectory=/home/user/projects/home_stack/ai_stack/llamacpp.server
StandardOutput=append:/home/user/projects/home_stack/ai_stack/llamacpp.server/server.log
StandardError=append:/home/user/projects/home_stack/ai_stack/llamacpp.server/server.log
User=%u
WorkingDirectory=%h/projects/home_stack/ai_stack/llamacpp.server
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target