Sign up here and you can log into the forum!

UMSP Data online

Discussion, features, plugins--everything about zoster's UMSP UPnP Media Server software

UMSP Data online   

Postby Birsel » Sun May 01, 2011 6:53 am

Hi, i´m not so good in English, so im sorry for the bad text how is now following.

Is it possible to load UMSP Data over the Internet?

I will load the umsp.php and the umsp-plugin.php over the Internet, because so i can edit these Data from everywhere. And very important everybody can use these data's.

Is there a way to do this?


Tank you
Birsel
n00b
 
Posts: 6
Joined: Sun May 01, 2011 6:49 am

Re: UMSP Data online   

Postby mad_ady » Sun May 01, 2011 8:19 am

You can create a bash script that can copy (wget) umsp.php from some web/ftp address to your /conf folder and you can call this script/commands at startup by calling them from /conf/S99user-script.

Here's what I would try (not tested):
Code: Select all
#!/bin/sh
wget -O /conf/umsp.php http://192.168.1.10/umsp.txt

... assuming your file is on 192.168.1.10 and is called umsp.txt.
User avatar
mad_ady
Developer
 
Posts: 4573
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: UMSP Data online   

Postby PaulF » Sun May 01, 2011 11:35 pm

I may be dreaming, but I thought a feature was added where config files can now be on a share.
User avatar
PaulF
Developer
 
Posts: 427
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: UMSP Data online   

Postby RMerlin » Mon May 02, 2011 5:57 am

PaulF wrote:I may be dreaming, but I thought a feature was added where config files can now be on a share.


app.bins can be netmounted. Configs are still centralized in /conf.
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: UMSP Data online   

Postby PaulF » Mon May 02, 2011 10:19 am

RMerlin wrote:
PaulF wrote:I may be dreaming, but I thought a feature was added where config files can now be on a share.


app.bins can be netmounted. Configs are still centralized in /conf.
That's it! I couldn't remember the the details and it was bugging me.
Another thought. Can the WDTV Samba server share the /conf directory?
User avatar
PaulF
Developer
 
Posts: 427
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: UMSP Data online   

Postby RMerlin » Mon May 02, 2011 10:36 am

PaulF wrote:
RMerlin wrote:
PaulF wrote:I may be dreaming, but I thought a feature was added where config files can now be on a share.


app.bins can be netmounted. Configs are still centralized in /conf.
That's it! I couldn't remember the the details and it was bugging me.
Another thought. Can the WDTV Samba server share the /conf directory?


Probably, but a bad idea on multiple fronts:

1) Fill up the approximate 100 KB of space it has, and you will corrupt your whole configuration
2) You'd want to run config_tool -s after saving any config file there
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: UMSP Data online   

Postby Birsel » Wed May 04, 2011 5:29 am

mad_ady wrote:You can create a bash script that can copy (wget) umsp.php from some web/ftp address to your /conf folder and you can call this script/commands at startup by calling them from /conf/S99user-script.

Here's what I would try (not tested):
Code: Select all
#!/bin/sh
wget -O /conf/umsp.php http://192.168.1.10/umsp.txt

... assuming your file is on 192.168.1.10 and is called umsp.txt.



Hi, first thank you.

But i´m new in this Area, so please help me again. How can i create a bash script? what is the ending? .bash?
And please tell me the way how i can load these data from a URL just like http://www.my-umsp-data.com/umsp.php or something like that. Then we need a second bash script beacuase the umsp-plugin.php data must load too.

But a big problem for me is first to find the S99user-script. Should i create this file? And what is the ending here?

Thank you very much for all these information.

Birsel
Birsel
n00b
 
Posts: 6
Joined: Sun May 01, 2011 6:49 am

Re: UMSP Data online   

Postby recliq » Wed May 04, 2011 5:43 am

The file ending does not matter!

Linux doesn't care about file extensions, it's just a part of the filename.
What makes a script a script then you may ask...
Two things:
1) The very first line inside the script (called shebang), eg something like this for a bash script:
Code: Select all
#!/usr/bin/bash

This tells linux to execute the script using /usr/bin/bash as interpreter.
2) The script must have the executable bit set. (the x's in the first collumn when you do a ls-al)
To make a script executable run chmod a+x on it:
Code: Select all
chmod a+x myscript


You have to create S99user-script:
1) Telnet/SSH into WD
2) Create S99user-script:
Code: Select all
touch /conf/S99user-script

3) Write your script
Code: Select all
nano /conf/S99user-script

put this inside:
Code: Select all
#!/bin/sh
wget -O /conf/umsp.php http://www.my-umsp-data.com/umsp.php

Save the script by hitting STRG+x, answer Y and press return.
4) Make the script executable
Code: Select all
chmod a+x /conf/S99user-script

5) Save /conf
Code: Select all
config_tool -s
config_tool -s


A note on the download of umsp.php:
Make sure the webserver delivering the file does not have php enabled, otherwise it will try to execute umsp.php instead of delivering it for download. If the webserver has php enabled you need to write a php script which outputs the contents of your desired umsp.php (eg. as a <pre> block).
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: UMSP Data online   

Postby mad_ady » Wed May 04, 2011 6:36 am

Also, can you elaborate what is umsp-plugin.php? Is it a specific plugin for you?

in this case, assuming it's just one file (and that you enable it in umsp.php), you can add to your S99user-script the following line:

Code: Select all
wget -O /tmp/umsp-plugins/umsp-plugin.php http://www.my-umsp-data.com/umsp-plugin.php


Again, what RMerlin said remains valid - your web server must not try to execute the PHP file. One workaround would be to name your files with .txt instead of .php on your server. The wget command above will rename them for you.

My suggestion is - first try to run the commands by hand and see if they work/what they do. When you are satisfied with them, you can add them to you S99user-script so that they are run on startup.
User avatar
mad_ady
Developer
 
Posts: 4573
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania


Return to UMSP Media Server

Who is online

Users browsing this forum: No registered users and 2 guests

cron