fix install

This commit is contained in:
nmemmert
2026-06-10 09:29:54 -04:00
parent 33107cf7af
commit b40f03846d
2 changed files with 82 additions and 4 deletions
+9
View File
@@ -21,5 +21,14 @@ stop_pid_file() {
stop_pid_file "$ROOT_DIR/.api.pid" "API server"
stop_pid_file "$ROOT_DIR/.vite.pid" "Vite server"
# ── If installed as a systemd service, restart that instead ──────────────────
if command -v systemctl >/dev/null 2>&1 && systemctl list-unit-files study-app.service >/dev/null 2>&1; then
echo "Found study-app systemd service — restarting it..."
sudo systemctl restart study-app
sleep 1
systemctl status study-app --no-pager -l
exit 0
fi
echo "Restarting via setup.sh..."
exec "$ROOT_DIR/setup.sh"