[PR #13203] [CLOSED] fix: prevent overwriting existing systemd service file #39992

Closed
opened 2026-04-23 00:59:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13203
Author: @neotty
Created: 11/22/2025
Status: Closed

Base: mainHead: install-scripts-dev


📝 Commits (1)

  • a37671d fix: prevent overwriting existing systemd service file

📊 Changes

1 file changed (+6 additions, -2 deletions)

View changed files

📝 scripts/install.sh (+6 -2)

📄 Description

Changes

  • Added existence check before creating ollama.service
  • Display informative message when service file already exists
  • Prevents accidental overwrite of custom systemd configurations

Motivation

During installation/upgrade, the script was unconditionally overwriting
the systemd service file, which could destroy user customizations such as:

  • Custom environment variables
  • Modified resource limits
  • Custom startup parameters

Impact

  • Safer upgrades that preserve user configurations
  • Better user experience for those who have customized the service
  • No breaking changes for fresh installations

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13203 **Author:** [@neotty](https://github.com/neotty) **Created:** 11/22/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `install-scripts-dev` --- ### 📝 Commits (1) - [`a37671d`](https://github.com/ollama/ollama/commit/a37671dc64b405500a4ed07028b8772beb1f57b2) fix: prevent overwriting existing systemd service file ### 📊 Changes **1 file changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `scripts/install.sh` (+6 -2) </details> ### 📄 Description ### Changes - Added existence check before creating ollama.service - Display informative message when service file already exists - Prevents accidental overwrite of custom systemd configurations ### Motivation During installation/upgrade, the script was unconditionally overwriting the systemd service file, which could destroy user customizations such as: - Custom environment variables - Modified resource limits - Custom startup parameters ### Impact - Safer upgrades that preserve user configurations - Better user experience for those who have customized the service - No breaking changes for fresh installations --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 00:59:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#39992