Merge pull request #606 from jmorganca/mxyng/install.sh-2
ordered list of install locations
This commit is contained in:
commit
c0b1bf7537
1 changed files with 8 additions and 4 deletions
|
@ -54,9 +54,13 @@ fi
|
||||||
status "Downloading ollama..."
|
status "Downloading ollama..."
|
||||||
curl --fail --show-error --location --progress-bar -o $TEMP_DIR/ollama "https://ollama.ai/download/ollama-linux-$ARCH"
|
curl --fail --show-error --location --progress-bar -o $TEMP_DIR/ollama "https://ollama.ai/download/ollama-linux-$ARCH"
|
||||||
|
|
||||||
status "Installing ollama to /usr/bin..."
|
for BINDIR in /usr/local/bin /usr/bin /bin; do
|
||||||
$SUDO install -o0 -g0 -m755 -d /usr/bin
|
echo $PATH | grep -q $BINDIR && break || continue
|
||||||
$SUDO install -o0 -g0 -m755 $TEMP_DIR/ollama /usr/bin/ollama
|
done
|
||||||
|
|
||||||
|
status "Installing ollama to $BINDIR..."
|
||||||
|
$SUDO install -o0 -g0 -m755 -d $BINDIR
|
||||||
|
$SUDO install -o0 -g0 -m755 $TEMP_DIR/ollama $BINDIR/ollama
|
||||||
|
|
||||||
install_success() { status 'Install complete. Run "ollama" from the command line.'; }
|
install_success() { status 'Install complete. Run "ollama" from the command line.'; }
|
||||||
trap install_success EXIT
|
trap install_success EXIT
|
||||||
|
@ -76,7 +80,7 @@ Description=Ollama Service
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/ollama serve
|
ExecStart=$BINDIR/ollama serve
|
||||||
User=ollama
|
User=ollama
|
||||||
Group=ollama
|
Group=ollama
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
Loading…
Reference in a new issue