Mailing List CGatePro@mail.stalker.com Message #105314
From: Alexander Ryskin <arys@lle.rochester.edu>
Subject: Re: Startup.sh & MacOS X
Date: Wed, 19 Nov 2014 19:51:40 -0500
To: CommuniGate Pro Discussions <CGatePro@mail.stalker.com>
Martin,

the easiest way is probably to put necessary provisioning commands and checks for the IP address availability in the Startup.sh script. Just make sure you don't hang the system in the checking loop if some address does not become available.

Alex

On 11/19/2014 05:44 PM, Martin Miller wrote:
Thanks Bill & Alex. My goal is that it seems that CGate sometimes starts before some IP addresses have been provisioned, and I wanted to experiment to see if this fixes. Unfortunately the manual is vague and your replies are just what I need!

I have made my own launch item for Yosemite as start-up items are defunct. I will post once I have determined it all works.

On 20 November 2014 09:34, Alexander Ryskin <arys@lle.rochester.edu> wrote:
If the goal is to allow some earlier started background activity (e.g. mounts) to finish then both suggestions should work well.
If the goal is to allow some activity started later than CGP in the start up sequence to finish prior to actual start of CGP then Bill's suggestion should be used (provided the delayOnStart option does force CGP to start in the background and return control to the OS immediately). This scenario does not look realistic to me. If you need some procedure to finish before CGP starts why not put it in front of the CGP start script in the sequence and actually start it before starting CGP?

Alex


On 11/19/2014 02:05 PM, Bill Cole wrote:
On 19 Nov 2014, at 6:44, Alexander Ryskin wrote:

Put the Unix sleep command there, e.g.
  sleep 300
will delay the start by 5 minutes.

Alex

That will work on systems that parallelize startup tasks (not sure how MacOS X will handle it legacy StartupItems like CGP) but it might be better to use the actual CGP delayOnStart option, which I believe returns control to the calling script before the sleep is complete. If it didn't, systems that strictly serialize init tasks would get no benefit from the option.


On 11/19/2014 01:10 AM, Martin Miller wrote:
I want to delay the start of CGate on MacOS X.
I.e. to use the --delayonstart sss directive.
The guide says create a Startup.sh in the base directory.
OK, so what to put in that file?

This line:

SUPPLPARAMS="--delayOnStart 300"

The main start script "sources" Startup.sh and appends the $SUPPLPARAMS variable to the command like that launches CGP, so you can add any options you want to it.

As Alex's answer implies, you can put any valid shell commands in that script. It is especially useful for  doing sanity checks of the environment where you do have timing issues with parallelized init tasks, e.g. checking to make sure your machine has the networking and storage it needs for CGP to start correctly.

#############################################################
This message is sent to you because you are subscribed to
 the mailing list <CGatePro@mail.stalker.com>.
To unsubscribe, E-mail to: <CGatePro-off@mail.stalker.com>
To switch to the DIGEST mode, E-mail to <CGatePro-digest@mail.stalker.com>
To switch to the INDEX mode, E-mail to <CGatePro-index@mail.stalker.com>
Send administrative queries to <CGatePro-request@mail.stalker.com>



#############################################################
This message is sent to you because you are subscribed to
 the mailing list <CGatePro@mail.stalker.com>.
To unsubscribe, E-mail to: <CGatePro-off@mail.stalker.com>
To switch to the DIGEST mode, E-mail to <CGatePro-digest@mail.stalker.com>
To switch to the INDEX mode, E-mail to <CGatePro-index@mail.stalker.com>
Send administrative queries to  <CGatePro-request@mail.stalker.com>



--
MJM

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster