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

Similar Threads
thread Thread Starter Forum Replies Last Post
Apple script batch shell script prramesh Mac Programming 5 Sep 15, 2013 03:35 AM
AudioScope.sh shell script... wisecracker MacBook Pro 0 Jul 31, 2013 01:31 PM
Anyone know how to use AppleScript or shell-script? gba2000 Mac Applications and Mac App Store 0 Apr 23, 2013 11:14 AM
How to create a shell script and run it? Killwin98 Mac Programming 3 Mar 18, 2013 06:39 PM
Need help with a shell script thatgreenvw Mac Programming 1 Nov 30, 2012 07:55 AM

Forum Jump

All times are GMT -5. The time now is 03:12 PM.

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

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