fix[rules] updated location services rules

Changed kickstart to find the PID and do a kill -9 to the PID

Issue #372
This commit is contained in:
Bob Gendler
2024-03-06 11:46:39 -05:00
parent 8ab3ce3c01
commit f0ab5dc8ae
2 changed files with 6 additions and 2 deletions

View File

@@ -14,7 +14,9 @@ result:
fix: |
[source,bash]
----
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -bool false; /bin/launchctl kickstart -k system/com.apple.locationd
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -bool false;
pid=$(/bin/launchctl list | /usr/bin/awk '/com.apple.locationd/ { print $1 }')
kill -9 $pid
----
references:
cce:

View File

@@ -12,7 +12,9 @@ result:
fix: |
[source,bash]
----
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -bool true; /bin/launchctl kickstart -k system/com.apple.locationd
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -bool enable;
pid=$(/bin/launchctl list | /usr/bin/awk '/com.apple.locationd/ { print $1 }')
kill -9 $pid
----
references:
cce: