Difference between revisions of "S99user-script"
(Initial release) |
|||
Line 16: | Line 16: | ||
== Example script == | == Example script == | ||
The following S99user-script will update your youtube-subscription cache on startup | The following S99user-script will update your youtube-subscription cache on startup | ||
− | #!/bin/ | + | #!/bin/bash |
# update youtube subscriptions - delay with 30s! | # update youtube subscriptions - delay with 30s! | ||
(sleep 30; /usr/bin/php5-cgi /tmp/umsp-plugins/youtube-subscriptions/youtube-subscriptions-helper.php --insecure > /tmp/youtube-subscriptions.txt 2>&1)& | (sleep 30; /usr/bin/php5-cgi /tmp/umsp-plugins/youtube-subscriptions/youtube-subscriptions-helper.php --insecure > /tmp/youtube-subscriptions.txt 2>&1)& |
Revision as of 04:15, 27 August 2011
What does it do?
The /conf/S99user-script is a Bash script that is automatically run at the end of the firmware boot. You can include in it commands that will be executed on system startup.
How to create
The /conf/S99user-script is a user-created file, inside the persistent /conf partition on your WDTV. It does not come with the firmware and needs to be created if it is necessary.
Run the commands below through telnet/ssh on your wdtv to create it (the commands and names are case sensitive!):
touch /conf/S99user-script chmod a+x /conf/S99user-script config_tool -s; config_tool -s
Using a text editor of your choice you can edit the file and add the commands you need inside. The first line of the script MUST be the following:
#!/bin/bash
Recommended command line text editors are nano or vi
Example script
The following S99user-script will update your youtube-subscription cache on startup
#!/bin/bash # update youtube subscriptions - delay with 30s! (sleep 30; /usr/bin/php5-cgi /tmp/umsp-plugins/youtube-subscriptions/youtube-subscriptions-helper.php --insecure > /tmp/youtube-subscriptions.txt 2>&1)&