The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > OS X (Apple)
Google UNIX.COM


OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unix executable file problem on MAC OSX ??? please help chadb Filesystems, Disks and Memory 1 01-31-2008 03:23 PM
creating executable for every C file compbug UNIX for Dummies Questions & Answers 7 09-30-2007 01:03 PM
How to route error to log file in unix pinky UNIX for Dummies Questions & Answers 4 07-31-2007 08:48 AM
How can i read a non text file in unix - ELF-64 executable object file - IA64 alexcol UNIX for Advanced & Expert Users 4 07-20-2007 02:05 PM
problem in creating executable for a client program konas High Level Programming 2 11-17-2006 10:09 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8 (permalink)  
Old 04-24-2008
Registered User
 

Join Date: Mar 2008
Posts: 13
sorry for the late follow up, but depending on what you want to do, you may want to make a launchd item.

That way it will run as a system daemon and always run, depending on what you want to accomplish.
Reply With Quote
Forum Sponsor
  #9 (permalink)  
Old 04-25-2008
Registered User
 

Join Date: Mar 2008
Posts: 11
Quote:
Originally Posted by tlarkin View Post
sorry for the late follow up, but depending on what you want to do, you may want to make a launchd item.

That way it will run as a system daemon and always run, depending on what you want to accomplish.
I'll give it a shot, thanks for the tip. -UMH
Reply With Quote
  #10 (permalink)  
Old 04-30-2008
Registered User
 

Join Date: Mar 2008
Posts: 13
Quote:
Originally Posted by unimachead View Post
I'll give it a shot, thanks for the tip. -UMH
Basically, Apple decided to get rid of all other launch daemons and have one to rule them all, launchd. You can write a script and toss it, in lets say, /usr/sbin/myscript.sh

Next you can create a launchd item that will run at log in or start up for every user by placing the .plist file in /Library/LaunchDaemons

example:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.tlarkin.myscript.sh.plist</string>
	<key>Nice</key>
	<integer>-9</integer>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/sbin/myscript.sh</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>
If you want it to run for specific users, you toss it in ~/Library/LaunchAgents for that particular user.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0