Commit e812c8d7 authored by Peter Möller's avatar Peter Möller

Added flag for required reboot

parent 52b789c9
......@@ -101,6 +101,13 @@ else
fi
# Uptime
Uptime="$(python -c "print(float(($(date +%s)-$(sysctl -n kern.boottime | awk '{print $4}' | sed -e 's/,//'))/86400))" | cut -d\. -f1)"
# Restart required?
if [ -n "$(/usr/sbin/softwareupdate -l 2>/dev/null | egrep "restart")" ]; then
RebootRequired="Yes"
else
RebootRequired="No"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
......@@ -142,7 +149,7 @@ else
fi
# Assemble the Flags string
Flags="\"SIP:$SIP\", \"ALF:${ALF}\", \"PFF:$PFF\", \"FileVault:$FileVault\", \"GateKeeper:$GateKeeper\", \"LittleSnitch:$LittleSnitch\", \"arch:${Architecture:---}\", \"selinux:N/A\", \"Uptime-days:$Uptime\""
Flags="\"SIP:$SIP\", \"ALF:${ALF}\", \"PFF:$PFF\", \"FileVault:$FileVault\", \"GateKeeper:$GateKeeper\", \"LittleSnitch:$LittleSnitch\", \"arch:${Architecture:---}\", \"selinux:N/A\", \"Uptime-days:$Uptime\", \"Reboot-required:$RebootRequired\""
# Ex: Flags='"SIP:Enabled", "ALF:Enabled", "PFF:Disabled", "FileVault:Off", "GateKeeper:Enabled", "LittleSnitch:Not running", "arch:x86_64", "selinux:N/A"'
# partitions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment