Merge 4360f700c58819e65a6ea21c12685efa0e6227dc into d7eb05b9361febead29a74e71ddffc2ebeff5302
This commit is contained in:
commit
0eebfdaa0c
@ -4,9 +4,12 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
red="$( (/usr/bin/tput bold; /usr/bin/tput setaf 1; :) 2>&-)"
|
||||||
|
plain="$( (/usr/bin/tput sgr0; :) 2>&-)"
|
||||||
|
|
||||||
status() { echo ">>> $*" >&2; }
|
status() { echo ">>> $*" >&2; }
|
||||||
error() { echo "ERROR $*"; exit 1; }
|
error() { echo "${red}ERROR:${plain} $*"; exit 1; }
|
||||||
warning() { echo "WARNING: $*"; }
|
warning() { echo "${red}WARNING:${plain} $*"; }
|
||||||
|
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
cleanup() { rm -rf $TEMP_DIR; }
|
cleanup() { rm -rf $TEMP_DIR; }
|
||||||
@ -146,6 +149,12 @@ EOF
|
|||||||
start_service() { $SUDO systemctl restart ollama; }
|
start_service() { $SUDO systemctl restart ollama; }
|
||||||
trap start_service EXIT
|
trap start_service EXIT
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
warning "systemd is not running"
|
||||||
|
if [ "$IS_WSL2" = true ]; then
|
||||||
|
warning "see https://learn.microsoft.com/en-us/windows/wsl/systemd#how-to-enable-systemd to enable it"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user