Skip to content

Commit

Permalink
wd-security (new cask)
Browse files Browse the repository at this point in the history
  • Loading branch information
unitof committed May 20, 2024
1 parent b6c0c75 commit 52aec0c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Casks/w/wd-security.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
cask "wd-security" do
version "2.1.2.144"
sha256 :no_check

url "https://downloads.wdc.com/wdapp/WD_Security_MACOS.zip",
verified: "downloads.wdc.com/wdapp/"
name "WD Security"
desc "Lock and unlock Western Digital external drives with hardware encryption"
homepage "https://support-en.wd.com/app/answers/detailweb/a_id/50696"

livecheck do
url "https://support-en.wd.com/app/answers/detailweb/a_id/29490"
regex(/Version:?\s*(\d+(?:\.\d+)+)/i)
end

container nested: "WD Security Installer.dmg"

installer script: {
# replicating #{staged_path}/installer.sh
executable: "#{staged_path}/exec/WD Security Installer.app/Contents/MacOS/WD Security Installer",
args: ["-install", "-silent"],
sudo: true,
}

uninstall launchctl: "com.wdc.WDPrivilegedHelper",
script: {
# replicating #{staged_path}/installer.sh
executable: "#{staged_path}/exec/WD Security Installer.app/Contents/MacOS/WD Security Installer",
args: ["-uninstall", "-silent"],
sudo: true,
},
delete: [
"/Library/LaunchDaemons/com.wdc.WDPrivilegedHelper.plist",
"/Library/PrivilegedHelperTools/com.wdc.WDPrivilegedHelper",
]

zap trash: "~/Library/Preferences/com.wdc.branded.security.plist"
end

0 comments on commit 52aec0c

Please sign in to comment.