Skip to content

Commit 888f84d

Browse files
committed
refact: reports dialog
1 parent 96a4e2e commit 888f84d

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎system/cuos/dialog-maintenance.sh‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,21 @@ system_shutdown() {
153153
fi
154154
}
155155

156+
perform_system_update() {
157+
docker exec cuos-app /api/cuos-trigger-update
158+
R="$?"
159+
# if Container not started or API it not defined, perform cuos update
160+
if [[ "$R" == 1 || "$R" == "126" ]]; then
161+
cuos update
162+
fi
163+
}
164+
156165
system_update() {
157166
if ! yesno "Apply the latest system update?\n\nThis may take several minutes and the system may reboot automatically." "System Update" 11 70; then
158167
return
159168
fi
160-
api_stream "Applying System Update" cuos update
169+
export -f perform_system_update
170+
api_stream "Applying System Update" perform_system_update
161171
}
162172

163173
system_rollback() {

0 commit comments

Comments
 (0)