Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
5c18e663
Unverified
Commit
5c18e663
authored
Nov 19, 2024
by
frob
Committed by
GitHub
Nov 18, 2024
Browse files
Notify the user if systemd is not running (#6693)
Co-authored-by:
Richard Lyons
<
frob@cloudstaff.com
>
parent
35096a7e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
scripts/install.sh
scripts/install.sh
+11
-2
No files found.
scripts/install.sh
View file @
5c18e663
...
@@ -4,9 +4,12 @@
...
@@ -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
;
}
...
@@ -162,6 +165,12 @@ EOF
...
@@ -162,6 +165,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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment