fix: streamline update_script function by consolidating service stop and backup logic
This commit is contained in:
@@ -25,7 +25,7 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if check_for_gh_release "localagi" "mudler/LocalAGI"; then
|
||||
msg_info "Stopping LocalAGI service"
|
||||
$STD systemctl stop localagi
|
||||
msg_ok "Stopped LocalAGI service"
|
||||
@@ -52,6 +52,8 @@ function update_script() {
|
||||
$STD go build -o /usr/local/bin/localagi || {
|
||||
msg_error "Failed to build LocalAGI from source"
|
||||
exit 1
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
systemctl enable -q --now localagi
|
||||
|
||||
Reference in New Issue
Block a user