• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script


  • Subject: Re: do shell script
  • From: James Sentman <email@hidden>
  • Date: Mon, 8 Jul 2002 09:06:49 -0400

At 7:46 PM +1000 7/8/02, Peter Gort wrote:
Interesting suggestion James, I thought you'd hit the jackpot, but unfortunately the daemon doesn't launch! AppleScript does NOT hang though, so I reckon you are right on the money that it can't detach the process, even with the Ampersand on the end of the command to background it.

the command I used was

<path to fmserverd> start -c <path to config file> > /dev/null &

I also tried redirecting the command as Jon suggested, have another app perform the command and have my script just instruct the app. Unfortunately it still doesn't work, AppleScript still locks up.

One of my colleagues at work is stumped by exactly the same problem, I went to work this morning and said "I ran into this problem on the weekend" and he said "don't tell me, you can't start the daemon!". Turns out he spent quite a bit of time on this too. he's also got a friend of his working on it.

I hope there IS an answer... is there another device that it can have output directed to besides /dev/null?

This is starting to sound more like a bug than just us misunderstanding the requirements. What folks are describing here just doesn't add up...

You can redirect to any file, so try just doing /tmp/fmp.out or something like that.

If that doesn't work you can send the command to another shell and remove it one more layer. That will almost certainly work, but does require a bit of messing around with escaping characters and such. Try something like:

echo <path to fmserverd> start \-c <path to config file> | /bin/sh >/dev/null &

that basically passes the command off to a separate shell and then detaches that shell. So it can lock that one all it wants, but you're another layer away.

the backslash before the - is necessary because we're using command line arguments and they have to be escaped. If you have any similar characters that they shell is interested in the paths you'll need to escape those too, but I think you should be OK. If it gives you errors drop me a note off the list with the full command including path info and I'll try to see why it's choking.

Please do let me know what happens!
James
--
_____________________________________________________________________________
James Sentman <email@hidden> http://www.sentman.com
Enterprise server monitoring for Mac OS X: http://whistleblower.sentman.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: do shell script (From: Peter Gort <email@hidden>)

  • Prev by Date: Re: do shell script
  • Next by Date: dynamically created popup button items
  • Previous by thread: Re: do shell script
  • Next by thread: Re: do shell script
  • Index(es):
    • Date
    • Thread