Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 10, 2013, 07:45 AM   #1
mehdies
macrumors member
 
Join Date: Jun 2012
Startup a shell script as root

I want to execute a shellscript as root once,i want this script execute when system restrats.how do this?
mehdies is offline   0 Reply With Quote
Old Mar 10, 2013, 08:31 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Use launchd. Specifically, make a plist for a LaunchDaemon. More specifically, read about the RunAtLoad key.

Required reading:
TN2083: Daemons and Agents
launchd.plist man page
chown33 is offline   0 Reply With Quote
Old Mar 12, 2013, 03:17 AM   #3
mehdies
Thread Starter
macrumors member
 
Join Date: Jun 2012
Thanks chown33.going for test!
mehdies is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump


All times are GMT -5. The time now is 11:41 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC