NextPVR Forums

Full Version: User changes to startup scripts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This is a thread links to user suggested changes to html, feel free to add your suggestions, but it is best to comment in the original thread.

Martin
Having /etc/mvpmc on a USB or Hard Disk

http://forums.nextpvr.com/showthread.php?t=35188
Adding a username password.

http://forums.nextpvr.com/showthread.php?t=35387

(mvpmc users will still need /etc/mvpmc to be a guest share)
It is also possible to create one cgi script that both starts telnet and starts gbpvr.
Then you can add the URL to that script as a webservice in the MVP.
(However, I don't know wich is the latest firmware you need to do this)
ive run across similiar trouble it will load from network browser only. i figured out my trouble, it was kind of odd but after changing resolutions several times in startme up and config and also on pch itself something seems to get corrupt and the only way to start it is the browser. the fix for me was renaming the pc. befor renaming i tried deleting the share on pch making a new share and every other thing but nothing would work except browser. eventually i found renaming pc and editing the htm and scripts would be the only way to resolve for me.

agerdin,
this is around somewhere but if you havent been able to have autoload work heres index_sd.htm just edit pc name. you also might wanna ad the bit from post above <a href="http://localhost.drives:8883/NETWORK_SHARE/sharename/?home=1" tvid="home">Exit to PCH</a>
<BR>
also toautoload for hd just take the _sd.htm part off the htm file name.

<html>
<head>
<META http-equiv="Refresh" content="5;url=http://localhost.drives:8883/NETWORK_SHARE/MEDIACENTER:mvpmc/gbpvr.cgi">
</head>
<body bgcolor="blue">
<font face="Verdana" size=3>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table align="center" bgcolor="white" border="2" cellpadding="30">
<tr>
<th align="center" valign="middle">
<a href="http://localhost.drives:8883/NETWORK_SHARE/MEDIACENTER:mvpmc/gbpvr.cgi">GB-PVR</a>
<BR>
<a href="http://localhost.drives:8883/NETWORK_SHARE/NETWORK_BROWSER/browser.cgi">GB-PVR via Network Browser</a>
<BR>
<a href="http://localhost.drives:8883/usb_a.cgi">GB-PVR via USB</a>
<BR>
</th>
</tr>
</table>
</font>
</body>
</html>
here's a telnet script.cgi for loading from network share...
it automatically returns to menu index.htm when it's done...Smile
i made it a bit easier to edit by using variables so only one edit is needed near top..

Code:
#!/bin/sh

echo "Content-Length: 184";
echo "Content-type: text/html";
echo "";

SERVER="[b][color=Magenta]server[/color][/b]"
   echo "<HEAD>"; #6
   echo '<META http-equiv="Refresh" content="3;url=index.htm">'; #53 total
   echo "</HEAD>"; #7
   echo "<body>"; #6
   echo '<BR><BR><BR><BR><FONT SIZE="7"><b><center>'; #39
cd ~
if [ -f /usr/bin/utelnetd ]; then
   echo "Telnet is already loaded.....<BR>"; #33
else
    cp /opt/sybhttpd/localhost.drives/NETWORK_SHARE/$SERVER/utelnetd /usr/bin
    ln -s /lib/librmjpeg.so /lib/libjpeg.so.62
    ln -s /lib/librmzlib.so /lib/libz.so
    ln -s /lib/librmzlib.so /lib/libz.so.1
    ln -s /lib/librmzlib.so /lib/libz.so.123
    utelnetd -l /bin/sh -p 23 &
   echo "Telnetd started on port 23...<BR>"; #33
fi
   echo "Returning to Main Menu........";  #30
   echo "</body>"; #7
exit 0;
edit part in bold to your share name as seen on PCH network screen..[ http://pch-ip:8883/network_share.html ]
[for example, this script works as is on my pch where first setup share name is 'pvr']

coming soon: index.htm with menu choices for pvrx2, telnet, hard reboot, and 'go back to pch menus' with a nice background and table.
and gbpvr.cgi to load pvrx2 + licrd1 for mvp remote.

gbpvr.cgi:
Code:
#!/bin/sh

echo "Content-Length: 30";
echo "Content-type: text/html";
echo "";

SERVER="[b]XXX.XXX.XXX.XXX[/b]"
SHARE="[b]MVPMC[/b]"
cd ~
mkdir /etc/mvpmc
mount -t cifs //$SERVER/$SHARE /etc/mvpmc/ -o username=guest,ro;
if [ -f /etc/mvpmc/lircd1 ]; then  
cp /etc/mvpmc/lircd1 /bin
killall lircd
lircd1 &
fi
killall gaya
sh -c /etc/mvpmc/startmeup 2>/dev/null >/dev/null &
works every time...Big Grin
note: this one loads lircd1 replacement for mvp remote, so lircd1 should be in your share dir.
it now skips that part if lircd1 not found..Smile

any questions, just ask..
as always, save with editpad or other unix compatible editor, don't use notepad.
Thanks pBS, add an existence test for lircd1 and then it doesn't even need to be modified.

Martin
actually it didn't seem to care if it wasn't there, but i modified it anyways to be correct..
thanx for spotting that...
man, if we only had ssi or a little javascript things would be so much easier!

i was thinking about making a auto-generating htm page, basically a cgi script that would query the system for available drives and present only valid links where index.htm resided...
[if not too much parsing involved]

but with csi out there now and not many changes on this stuff in a while, not sure it's worth it...still lots to play with and learn..Smile
had grandma watching it the other day...she's 97 Big Grin [can we say GAF? LOL]
[her fragile fingers can barely press the remote]

thanx so much for all your hard work!
Is there a list of available commands for use in scripts somewhere?

With the coming advent of the new 1.4.x version I am going to need to be able to select which server to start/view on my NMT so I can update the Blue-Retro-xxx skins for the new version, I won't be updating my main server to 1.4.x for a while as I like to be sure things are stable before I do that (has a LOT to do with the WAF).
Pages: 1 2