I have a bash script that I have turned into a standalone macOS app (i.e. I created a folder
Script.app which contains subfolders
MacOS and in the folder MacOS resides my bash script). If I open the app the bash script runs and after the successful run, the app closes immediately.
I would like the app to remain open and run another bash script upon quitting the app. Or, if this cannot be done, perform some Finder action upon quitting (more precisely unmounting a Volume).