diff --git a/Casks/c/cloudnet.rb b/Casks/c/cloudnet.rb new file mode 100644 index 0000000000..c55d46fec6 --- /dev/null +++ b/Casks/c/cloudnet.rb @@ -0,0 +1,42 @@ +cask "cloudnet" do + version "1.36.2.1" + sha256 "53489f77226b4fa55fcefeed68dfeb66e289e3307cfaaa298a4895488dfac6ac" + + url "https://pkgs.cloudnet.world/stable/macos/CloudNet_v#{version}.dmg" + name "CloudNet for Mac client" + desc "Enterprise-level meshVPN cloud service" + homepage "https://cloudnet.world/" + + livecheck do + url "https://pkgs.cloudnet.world/stable/appcast.xml" + strategy :sparkle + end + + auto_updates true + depends_on macos: ">= :catalina" + + app "CloudNet.app" + installer script: { + executable: "CloudNet.app/Contents/Resources/cnet", + args: ["install"], + sudo: true, + } + + uninstall quit: "world.cloudnet.client", + launchctl: "world.cloudnet.client.cloudnetd", + script: { + executable: "CloudNet.app/Contents/Resources/cnet", + args: ["uninstall"], + sudo: true, + }, + delete: [ + "/Applications/CloudNet.app", + "/Library/LaunchDaemons/world.cloudnet.client.cloudnetd.plist", + ] + + zap trash: [ + "~/Library/Containers/world.cloudnet.client", + "~/Library/Group Containers/$(TeamIdentifierPrefix)world.cloudnet.client", + "~/Library/Preferences/world.cloudnet.client.cloudnetd.plist", + ] +end