Skip to main content

Timeline for answer to Converting Automator Action in applescript to bash script by Mateusz Szlosek

Current License: CC BY-SA 3.0

Post Revisions

10 events
when toggle format what by license comment
Jul 29, 2014 at 16:32 comment added Mateusz Szlosek So it's a bit risky to let apps do the work with elevated privilages. However I can help You compile ObjC application to launch bashscript. We may try to ask for passowrd with a prompt, or something with setuid/setgid. Here are some informations about differences: developer.apple.com/library/mac/documentation/security/…
Jul 29, 2014 at 16:18 comment added TheLearner Well, honestly, I already have the Automator script but the whole point i was looking for a bash translation was to not have to use Automator to run the program. I was looking for something like a standalone app with all the required privileges or maybe a popup but without the automator or terminal running in the background
Jul 29, 2014 at 15:45 comment added Mateusz Szlosek @AmitSchandillia You may insert this script to AppleScript editor, add line like: do shell script ... with administrator privileges You'll be prompted to input Your password. Another way is to make an application which will launch Your script with sudo. Generally executables properly enclosed inside *.app bundle does not have to launch Terminal.
Jul 29, 2014 at 15:30 vote accept TheLearner
Jul 29, 2014 at 15:26 comment added TheLearner @MateuszSzlosek thanks for the detailed answer. But won't this launch in Terminal even if I compiled it as a UNIX executable because of the sudo? Is there any way to make the program Terminal-independent?
Jul 29, 2014 at 14:35 comment added nohillside Upps, right, didn't notice that
Jul 29, 2014 at 14:34 comment added Mateusz Szlosek @patrix that is correct. I've mentioned about that in my answer. To get one specific interface IP script would need to be changed.
Jul 29, 2014 at 14:31 comment added nohillside The assignment to IPADDR assumes that there is only one active network interface besides localhost
Jul 29, 2014 at 14:28 history edited nohillside CC BY-SA 3.0
formatting fixed
Jul 29, 2014 at 12:01 history answered Mateusz Szlosek CC BY-SA 3.0