diff --git a/debian/changelog b/debian/changelog index 2d47d5d..c3865da 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ollama (0.12.11rakuos1) unstable; urgency=medium +ollama (0.12.11rakuos4) unstable; urgency=medium * Initial packaging. diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..09d23c2 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,4 @@ +#!/bin/sh +set -e + +#systemctl enable --now ollama.service diff --git a/debian/preinst b/debian/preinst new file mode 100755 index 0000000..cc4c721 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +# Create ollama system user + group if not exist +if ! id ollama >/dev/null 2>&1; then + adduser \ + --system \ + --home /var/lib/ollama \ + --shell /usr/sbin/nologin \ + --no-create-home \ + --group \ + ollama +fi + +# Make sure home exists +mkdir -p /var/lib/ollama +chown ollama:ollama /var/lib/ollama +chmod 750 /var/lib/ollama + +exit 0