Skip to content

Commit 02daf33

Browse files
authored
Update navicat14.sh
1 parent 8dd6a11 commit 02daf33

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Navicat/navicat14.sh

+1-11
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,7 @@ EOF
3535
cat <<EOF>"/tmp/$targetFile"
3636
#!/bin/bash
3737
38-
Plist="\${1:-com.navicat.NavicatPremium.plist}"
39-
40-
defaults write "\$Plist" SUSendProfileInfo -int 0;
41-
defaults write "\$Plist" SUHasLaunchedBefore -int 0;
42-
defaults write "\$Plist" SUEnableAutomaticChecks -int 0;
43-
defaults write "\$Plist" didNAV16WelcomePageShow -int 1;
44-
defaults delete "\$Plist" tableViewPreference >/dev/null 2>&1 ;
45-
46-
defaults read "\$Plist" |grep '{' |grep -o '[0-9A-Z]\{32\}' |xargs -I {} defaults delete "\$Plist" "{}"
47-
48-
for user in \`find /Users -type d -maxdepth 1\`; do NavicatPath="\$user/Library/Application Support/PremiumSoft CyberTech/Navicat CC/Navicat Premium"; [ -d "\$NavicatPath" ] || continue; find "\$NavicatPath" -type f -name ".*" -delete; done
38+
for user in \`sudo dscl . list /Users NFSHomeDirectory |grep -v '^_\\|^root\\|^daemon\\|^nobody' |sed 's/[[:space:]]\\{1,\}/\\;/g'\`; do userName=\`echo "\$user" |cut -d';' -f1\`; userHome=\`echo "\$user" |cut -d';' -f2\`; PlistPath="\$userHome/Library/Preferences"; [ -d "\$PlistPath" ] || continue; for plist in \`find "\$PlistPath" -type f -name "*NavicatPremium*" -maxdepth 1\`; do sudo -u "\$userName" defaults write "\$plist" SUSendProfileInfo -int 0; sudo -u "\$userName" defaults write "\$plist" SUHasLaunchedBefore -int 0; sudo -u "\$userName" defaults write "\$plist" SUEnableAutomaticChecks -int 0; sudo -u "\$userName" defaults write "\$plist" didNAV16WelcomePageShow -int 1; sudo -u "\$userName" defaults delete "\$plist" tableViewPreference >/dev/null 2>&1 ; sudo -u "\$userName" defaults read "\$plist" |grep '{' |grep -o '[0-9A-Z]\\{32\\}' |xargs -I {} sudo -u "\$userName" defaults delete "\$plist" "{}"; done; NavicatPath="\$userHome/Library/Application Support/PremiumSoft CyberTech/Navicat CC/Navicat Premium"; [ -d "\$NavicatPath" ] || continue; find "\$NavicatPath" -type f -name ".*" -delete; done
4939
5040
date >"/tmp/navicat_14days.txt" 2>/dev/null
5141
# sudo launchctl load -w /Library/LaunchDaemons/$targetService

0 commit comments

Comments
 (0)