Auto-upgrade: Fix when no users are active
This commit is contained in:
parent
408893cd7f
commit
9aae1f5f83
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ in
|
|||
activate_configuration="no"
|
||||
|
||||
# Check if any user sessions are open
|
||||
active_users=$(users | tr ' ' '\n' | sort | uniq | grep -vE '^(${concatStringsSep "|" cfg.rebootIgnoreUsersActive})$')
|
||||
active_users=$(users | tr ' ' '\n' | sort | uniq | grep -vE '^(${concatStringsSep "|" cfg.rebootIgnoreUsersActive})$' || true)
|
||||
if [ "$reboot_allowed" = "yes" ] && [ -n "$active_users" ] ; then
|
||||
reboot_allowed=no
|
||||
email_body="$(printf "%s\n%s\n%s" "$email_body" "The system cannot reboot since the following users are active:" "$active_users")"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue