BareGit

model-switcher: add example systemd service file

Author: MetroWind <chris.corsair@gmail.com>
Date: Sun Jan 4 21:14:14 2026 -0800
Commit: cd194c29035c7ac6d49856586bf682e280c1ef43

Changes

diff --git a/model-switcher/model-switcher.service.example b/model-switcher/model-switcher.service.example
new file mode 100644
index 0000000..cc4d2e2
--- /dev/null
+++ b/model-switcher/model-switcher.service.example
@@ -0,0 +1,19 @@
+[Unit]
+Description=LLM Model Switcher Web App
+After=network.target
+
+[Service]
+Type=simple
+# This service requires root privileges to modify /etc symlinks and restart the llama.cpp service
+User=root
+# Update this path to the actual location of the model-switcher directory
+WorkingDirectory=/opt/small-tools-py/model-switcher
+# Update the python path if necessary. 
+# Added --host 0.0.0.0 to make it accessible from other machines if needed, 
+# or keep default (127.0.0.1) and use a reverse proxy.
+ExecStart=/usr/bin/python3 main.py --host 0.0.0.0 --port 7330
+Restart=always
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target