Skip to content

Instantly share code, notes, and snippets.

@smashism
Created August 19, 2024 14:58
Show Gist options
  • Save smashism/c6f569219acc97711dd2638da1c0e557 to your computer and use it in GitHub Desktop.
Save smashism/c6f569219acc97711dd2638da1c0e557 to your computer and use it in GitHub Desktop.
Force quit apps with a Self Service policy. $4 is a custom variable for "App Name" that can be supplied per policy depending on what needs to close.
#!/bin/bash
appName="$4"
# Kill the app, if running
echo "Killing $appName app process"
killall "$appName"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment