|
Hi, i need run a application when the mac is starting, i have do some tests but nothing works.
can you help me?
First i created a folder called MyStartupItem on directory /Library/StartupItems/
After this i created my shell script like in a tutorial that i found on the web.
_______________________________________________________________
#!/bin/sh
. /etc/rc.common
# start subroutine
StartService() {
# Insert your start command below. For example:
ConsoleMessage "opening chess"
open /Applications/Chess.app
# End example.
}
StopService() {
# Insert your stop command(s) below. For example:
#killall -TERM mydaemon
#sleep 10
# killall -9 mydaemon
# End example.
}
# The restart subroutine
RestartService() {
# Insert your start command below. For example:
#killall -HUP mydaemon
# End example.
}
RunService "$1"
_______________________________________________________________
I created too a StartupParameters.plist in the same folder that i had created before, but i don't understand how configure it.
_______________________________________________________________
<?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>Description</key>
<string>Chess</string>
<key>OrderPreference</key>
<string>None</string>
<key>Provides</key>
<array>
<string>Chess</string>
</array>
<key>Uses</key>
<array>
<string>None</string>
<string>Resolver</string>
</array>
</dict>
</plist>
_______________________________________________________________
when i reboot my mac, show a message saying that my script don't have the security setting, but the button "FIX" doesn't appear like i saw in some sites.
what i'm doing wrong?
thanks, darlan
|