diff --git a/fixcatalina/disable.sh b/fixcatalina/disable.sh index 134134c..f8f1cd0 100644 --- a/fixcatalina/disable.sh +++ b/fixcatalina/disable.sh @@ -162,10 +162,13 @@ TODISABLE+=( \ 'com.apple.telephonyutilities.callservicesd' \ ) -for agent in "${TODISABLE[@]}" -do - mv ./System/Library/LaunchAgents/${agent}.plist ./System/Library/LaunchAgents/${agent}.plist.bak - echo "[OK] Agent ${agent} disabled" +echo Disabling unwanted LaunchAgents... +for agent in "${TODISABLE[@]}"; do + if [[ -e "./System/Library/launchAgents/${agent}.plist" ]]; then + mv "./System/Library/LaunchAgents/${agent}.plist" \ + "./System/Library/LaunchAgents/${agent}.plist.bak" + echo "[OK] Agent ${agent} disabled" + fi done # Daemons to disable @@ -198,8 +201,10 @@ TODISABLE+=( \ 'com.apple.netbiosd' \ ) -for daemon in "${TODISABLE[@]}" -do - mv ./System/Library/LaunchDaemons/${daemon}.plist ./System/Library/LaunchDaemons/${daemon}.plist.bak - echo "[OK] Daemon ${daemon} disabled" +for daemon in "${TODISABLE[@]}" ; do + if [[ -e "./System/Library/LaunchDaemons/${daemon}.plist" ]]; then + mv "./System/Library/LaunchDaemons/${daemon}.plist" \ + "./System/Library/LaunchDaemons/${daemon}.plist.bak" + echo "[OK] Daemon ${daemon} disabled" + fi done