New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

PackageMaker PreFlight question


Post Reply New Thread Subscribe

 
Thread Tools
jonculloty

 
Member Since: Aug 19, 2009
Posts: 1
jonculloty is on a distinguished road
Mac Specs: imac 20'

jonculloty is offline
Hello,

I have a very small script that I want to run as a pre-flight step in packagemaker.... its used to kill a specific process.


#!/bin/ksh
pid=`ps -e | egrep nameofmyapp | egrep -v egrep | awk '{print $1}`
kill -TERM ${pid}


When I do "Build and Run" it throws the message "Install Failed". By trial and error I've figured out that it does not like the kill line. Running the script standalone in a terminal works perfectly. Anyone have any ideas whats going on here, I'm puzzled.

Thanks,
Jonathan
QUOTE Thanks
jobyabraham1983

 
jobyabraham1983's Avatar
 
Member Since: Sep 18, 2009
Location: India
Posts: 2
jobyabraham1983 is on a distinguished road

jobyabraham1983 is offline
Hi hello,

I am not sure but i think `ps -e | egrep nameofmyapp | egrep -v egrep | awk '{print $1}' won't return process id it will return user name so can you just try with pid=`ps -e | egrep nameofmyapp | egrep -v egrep | awk '{print $2}` instead of your particular command

Thanks you

JA For Mac/iPhone
QUOTE Thanks

Post Reply New Thread Subscribe


« Installing Bluefish HTML Editor on Mac | PackageMaker Prefligt is not working in MAC 10.6 (Snow Leopard) »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
The QUESTION Game ToddG Schweb's Lounge 159 08-15-2007 05:25 PM
Boot-Up Question Mark Folder Impending Doom Question. bingwalker OS X - Operating System 3 07-10-2007 05:19 AM
Ask 'me' a question... eric Schweb's Lounge 22 01-12-2007 06:33 AM
Video production question macinsandiego Movies and Video 4 11-17-2004 07:39 AM
Postscript question battleangel444 OS X - Operating System 2 07-09-2004 12:45 PM

All times are GMT -4. The time now is 01:50 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?