Benches macOS

3

Help 'Exiting' after Automator Shell Scri…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hello,

I've recently installed and got running GCalDaemon (
http://gcaldaemon.sourceforge.net/) which allows me to Synch Rainlendar <-> Google Calendar through iCal (You can also synch iCal <-> Google Calendar). I needed to start up a shell script/applescript after each startup/login in order for GCalDaemon to start the synching process each time and continue to do so at the timed intervals. I would do so by the following terminal code:

cd /usr/local/sbin/GCALDaemon/bin

./standalone-start.sh

I then tried automating this process and came across shell script execution through Automator. I did so and created a .app with the above mentioned code. This works and it starts up the necessary .sh file I need and the snyching works under StartUp. My concern is however, how do I exit terminal once the code has executed the necessary file? All I have in my .app is the above mentioned code for now. I just need it to exit terminal because on startup or after starting the program, I get this issue (See Attachment)

This continues to run, so my guess is that I need to add code to exit terminal and allow the .app to close itself properly after doing so.

Please guide me in the right direction.

Picture Belows shows what happens when I run the Automator App. It continues to run until I quit out of the app manually (TheGCal programs works fine though). I feel I need to have app quit Terminal or fully end the process and quit out on it's own.

Thanks

<table style="width:auto;"><tr><td>
User uploaded file</td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From
GCalDaemon</td></tr></table>

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I suspect there is a better way to deal with what you are trying to do but try this:

    /usr/local/sbin/GCALDaemon/bin/standalone-start.sh >/dev/null 2>&1 &

    I also combined the commands into one. splitting them in two is kind of silly.

  2. 0

    bkpatel7

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I tried it out and it works great.

    Now, if you don't mind if you could just give me an explanation of the what you added just for my own knowledge.

    Thanks.

  3. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    i redirected the command output to /dev/null which is unix equivalent of a black hole and I also redirected error output to standard output in case the script produces any errors.

    also & at the end tells it to continue without waiting for the script to finish.

    Message was edited by: V.K.