[Apple TV] XBMC shell script on boot
#1
Just as the title says, how can i accomplish this? I have a certain script that i want to have executed on boot.

Thanks! Big Grin
Reply
#2
Nobody knows this Sad ?
Reply
#3
add the path of your "certain" script to /etc/rc.local

or:

Code:
nano -w ~/Library/LaunchAgents/com.MySpecialScript.plist

paste the following into it:

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.MySpecialScript</string>
        <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
        <integer>1800</integer>
        <key>OnDemand</key>
    <false/>
    <key>ProgramArguments</key>    
    <array>    
    <string>[color=red]path/to/your/script.sh[/color]</string>
    </array>
</dict>
</plist>

press ctrl-x, press Y, press return to get back to command prompt and reboot

NOTE: untested
Reply
#4
Amet Wrote:add the path of your "certain" script to /etc/rc.local

or:

Code:
nano -w ~/Library/LaunchAgents/com.MySpecialScript.plist

paste the following into it:

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.MySpecialScript</string>
        <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
        <integer>1800</integer>
        <key>OnDemand</key>
    <false/>
    <key>ProgramArguments</key>    
    <array>    
    <string>[color=red]path/to/your/script.sh[/color]</string>
    </array>
</dict>
</plist>

press ctrl-x, press Y, press return to get back to command prompt and reboot

NOTE: untested

Thanks for your reply. Actually i already accomplished this, now it all works finally Big Grin !

The file you need to edit is rc.common (/etc/rc.common)

PS: What you said didn't worked. Those files don't exist, but the above file does work. Just for the information.
Reply

Logout Mark Read Team Forum Stats Members Help
[Apple TV] XBMC shell script on boot0