Script to restart bettertouchtool app

When right-clicking on the bettertouchtool icon in the dock there is an option to Restart App. I would like to have this functionality in my menu bar and to implement that I was wondering if it would be possible to create (or if there exists) a bash script to trigger that function.

Here's a little function that you can use to do that:

restart () {
	local A
	(( $# )) && for A in "$@"
	do (
		pkill -xi "$A"
		open -ga "$A"
	) &> /dev/null ; done || reboot

To use, just send the names of the applications you wish to (re)start as command-line parameters, e.g. restart "Better Touch Tool" (is it three words?)

Thanks so much this works perfectly!