Hi,

I'm trying to create a Daemon (service) as part of the installation, and before creating the new one I'm deleting the previous one, and under the new one I check whether the previous has been deleted, and only then create it. I've tried first using the innate "Create Service" block of the installer, but when it checks whether the old Daemon exists, it seems to not delete fast enough and the creation step just gets skipped.. so I've changed it to instead cp a .plist file and launchctl load it.. but after the cp, if i do a rule in the launchctl command to check for the file's existence, it also doesn't see it - i assume because it doesn't wait for the cp to finish and just continues. I've solved the problem by putting a 5s wait between the cp and the launchctl (I've also noticed that in the Windows service deletion you can add a <delay> tag to wait for the deletion - why is there no such option for the OSX service tag?).

Is there a better way to do this? maybe tell one step to wait for the previous step to finish? or have a step wait for the program being run to actually run or finish running? since I can't really count on an arbitrary delay number, and I can't increase it to no end.

Thanks.

asked 01 Mar '16, 03:21

Poster's gravatar image

Poster
16557
accept rate: 0%

edited 01 Mar '16, 03:36

Could you contact us at support@bitrock.com attaching your project XML file?

(03 Mar '16, 11:35) alejandror ♦♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×130
×18
×8
×3
×1

Asked: 01 Mar '16, 03:21

Seen: 386 times

Last updated: 03 Mar '16, 11:35