Merge pull request #1161 from jmorganca/mxyng/systemd-placeholder

placeholder environment variables
This commit is contained in:
Michael Yang 2023-11-17 14:45:38 -08:00 committed by GitHub
commit ad8659b980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,6 +97,16 @@ Environment="PATH=$PATH"
[Install]
WantedBy=default.target
EOF
mkdir -p /etc/systemd/system/ollama.service.d
cat <<EOF | $SUDO tee /etc/systemd/system/ollama.service.d/environment.conf >/dev/null
[Service]
#Environment="OLLAMA_HOST="
#Environment="OLLAMA_ORIGINS="
#Environment="OLLAMA_MODELS="
#Environment="HTTPS_PROXY="
EOF
SYSTEMCTL_RUNNING="$(systemctl is-system-running || true)"
case $SYSTEMCTL_RUNNING in
running|degraded)