Hi guys..
Can someone please give me some idea how I could possibly reboot the machine over the internet?
Thanks very much in advance.
- I have Accessbook, transmission installed but none offer this feature.
Hi guys..
Can someone please give me some idea how I could possibly reboot the machine over the internet?
Thanks very much in advance.
You can use OpenVPN to access MyBook Manager. There is a reboot function in MyBook Manager.
The other option is to write a script that you can select through AccessBook which will do the reboot.
Here is a link which give a How To for building a script to turn off/on OpenVPN remotely via AccessBook. Perhaps you can figure out how to make something similar for the reboot. I tried to write something similar to reboot Transmission via Accessbook, but I wasn't successful yet.
MyBookLive Duo 4T
FeaturesPacks, Twonky, ownCloud
I dont know what exactilly do you need, i have just find "the codes" for you.
To Restart "White Light" myBook connect as root and execute these commands:
/usr/sbin/xfs_quota -x -c off >/dev/null 2>&1
/usr/bin/nohup /etc/rc.reboot >/dev/null 2>&1 &
I dont use Accessbook neither Transmission so I cant give you a patch to add a "Restart Button" to them. Is that what you really need ?
Additionally, to ShutDown "White Light" myBook system execute these commands
/usr/sbin/xfs_quota -x -c off >/dev/null 2>&1
/usr/bin/nohup /etc/rc.poweroff >/dev/null 2>&1 &
I just used "reboot" with SSH. Or is this not good and i should reboot with /etc/rc.reboot ?
I dont really know if it is necessary to type those long commands. I just extract those commands from the Buttons ShutDown and Reboot that appear in the Administrative Web Interface.
Thanks for all your replies.
To shed some light on my set up -
The mybook is at home and I access via the web at work to start/stop downloads via Transmission.
Accessbook enables me to put .torrents files in the torrent folder which Transmission automatically starts
and Transmission web enables me to monitor the downloading progress from work.
This setup is perfect for me.
But…. today Transmission crashed.. and there was nothing I could do. Normally if I was at home I would enter Feature Packs Manager and restart Transmission or just simply restart the whole mybook.
I'll try the recommended above.
Any other suggestions.. please keep them coming. Thanks!!!
Since all you want to do is restart Transmission remotely, here is the solution. In conjunction with help from TeinturMan, I got a working script.
Also for managing your torrents remotely, you should check out this program. It is a lot better than the web interface. You won't even need AccessBook to get the torrents started up.
MyBookLive Duo 4T
FeaturesPacks, Twonky, ownCloud
I'd say if you're certain the problem is with Transmission go ahead and do what gun76 says above. However, I'd look for the root cause of the problem. It's likely that the NAS is running out of memory. I'd look into fine tuning the OS a little more. Read through this wiki about disabling services you don't need. You may find the problem actually fixes itself without the need to engineer yet another thing for the NAS.
Just a thought. I'd start with disabling mionet, and even the web management interface. You can also tune Transmission so it doesn't open too many connections - which could be part of your problem. I'd say, check those things first. ;-)
Let us know what happens.
I have the same problem with Transmission locking up every few days or so. It is a problem with CPU memory overload. There is another thread about this problem as well. I would very much like to know how to fine tune Transmission or the OS to make it all more efficient. How to stop Transmission from having too many connections?
MyBookLive Duo 4T
FeaturesPacks, Twonky, ownCloud
gunt6,
In my opinion, the EASY way of doing this is via the web interface of Transmission, just click on the little gear in the lower left corner.
Here's a screen shot of that:
http://www.transmissionbt.com/images/screenshots/Clutch-Large.jpg
You get an option for Upload and Download. Try and configure that and see if it helps. A good rate to start at is Download 200 kb/s and Upload 100kb/s. Like I said, try that first and see if it helps. You can always raise/lower that depending on your situation.
If you want a more permanent way, you'll have to search the wiki as I don't remember where I saw it, and after a quick search I didn't find the article on tuning Transmission immediately. I'll keep looking and I'll post if I ffind it. In the meantime, I suggest searching the wiki and reading up on it here:
"" Re: Reboot via web
gunt76gunt76 5 Mar 2010, 00:59 -0000
Since all you want to do is restart Transmission remotely, here is the solution. In conjunction with help from TeinturMan, I got a working script.
Also for managing your torrents remotely, you should check out this program. It is a lot better than the web interface. You won't even need AccessBook to get the torrents started up.""
I think this script will solve my problems but I have trouble applying this, may be because I have the White Light Version. I've replied to that thread.. hope you can help !!
You mentioned that you have AccessBook installed and are using it. You also stated that normally if Transmission crashed you would use TeinturMans's Feature Packs Manager to reach the Transmission control interface and restart Transmission.
I don't have a white light MBWE myself and I don't know if the file structures of Features Packs Manager are different than on the blue rings. If they are, then you will have to sort this out with someone who has a white lights or perhaps TeinturMan. All I can tell you is that the scripts must be accessible via AccessBook and that any files that are referenced in the scripts must be in the locations indicated. For example, one script references S90transmission. Find this file and its location. Make sure that the StartTransmission.sh script has the correct location of S90Transmission. Feel free to change the start/stop scripts to make sure they reference files correctly. You may have to search around to find the files that are indicated.
MyBookLive Duo 4T
FeaturesPacks, Twonky, ownCloud
Yes I have Feature Packs Manager and Accessbook installed
I know how to run the scripts through Accessbook. I can edit the scripts to the relevant directories, including S90Transmission which is in a optware directory.
But I can't find SetWebUser.sh I searched using find find / -name *.sh and I don't have that file.
What do you suggest I do?
Sorry that you can't find SetWebUser.sh. There seems to be large differences between Features Pack for white light and blue rings which I am unaware of.
Here is the code from SetWebUser.sh
#
# Sets the username and password for web users
FLAG=$1
HTDIGEST=/shares/internal/PUBLIC/WWW/Admin/WebUsers.htdigest.user
HTDIGESTOLD=/shares/internal/PUBLIC/WWW/Admin/WebUsers.htdigest.user.old
case $FLAG in
UPDATE_USER )
REALM=$2
USERNAME=$3
PWORD=$4
cp $HTDIGEST $HTDIGESTOLD
HTD=$(echo -n "$USERNAME:$REALM:$PWORD"|md5sum|cut -f1 -d" ")
sed "/^$USERNAME:$REALM:/d" <$HTDIGESTOLD >$HTDIGEST
echo "$USERNAME:$REALM:$HTD" >>$HTDIGEST
rm $HTDIGESTOLD
;;
DELETE_USER )
REALM=$2 # "WEB" or "WEBADMIN"
USERNAME=$3
cp $HTDIGEST $HTDIGESTOLD
sed "/^$USERNAME:$REALM:/d" <$HTDIGESTOLD >$HTDIGEST
rm $HTDIGESTOLD
;;
EXEC_SCRIPT ) ScriptPath=$2
sh $ScriptPath $3 $4 $5 >$ScriptPath.log 2>&1
;;
esac
exit 0
Maybe you can create SetWebUser.sh with this code. Or more likely, you don't even need to reference this script. You may have figured out that the StartTransmission.sh line which refers to SetWebUser.sh is simply putting the current user into superuser mode so that the script can be executed. Now that you see what the code does, maybe you can figure out the similar but different approach needed for the white lights version.
I really don't have any other suggestions except that you contact TeinturMan. If you are a registered member on his site, he is very responsive to questions. If you do figure out the code needed for the white lights version, please post it on the other thread about start/stop transmission.
MyBookLive Duo 4T
FeaturesPacks, Twonky, ownCloud
Hi all,
I have a specific hack to allow to remotely/safely connect to the Whitelight Western digital interface and feature pack manager, via web : ( never,never open the port 80 on your router to publish the western digital interface to internet, use the following hack instead…)
this hack require that you know how to modify a linux file…
1) installFeature pack manager, and the Webserver feature pack (http://highlevelbits.free.fr)
2) configure an alternative name for your public ip addres, using no-ip or dyndns.
something like "MyAdminAlias.servettp.com". This name should point to the same ip address as your public ip address.
when you will want to connect to the admin interface, you will have to connect to the url :
https://MyAdminAlias.servettp.com
note that it has to be different from the normal one you use to connect to accessbook…
2)edit the following file :
/opt/etc/lighttpd/conf.d/WWW-priv.conf
under the line :
server.modules += ( "mod_alias" )
add the line :
server.modules += ( "mod_proxy" )
under the line :
$SERVER["socket"] == ":443" {
add the following 4 lines :
$HTTP["host"] == "MyAdminAlias.servettp.com" {
proxy.server = ( "" => ( ( "host" => "127.0.0.1" ,
"port" => 80 ) ) )
}
3) restart lighttpd :
/opt/etc/init.d/S80lighttpd restart
4) when you need to connect remotely :
https://MyAdminAlias.servettp.com
you will be prompted for a user and password : use the same as for AccessBook
You will see the standard western digital interface,
login with the admin credentials
an error 404 web page is displayed: this is normal.
5) change the url address and add "/admin" at the end of the url , without closing the internet explorer window.
https://MyAdminAlias.servettp.com/admin
now , you have access to your admin console…
if you need access to the feature pack manager, add "/fpkmgr" to the url :
https://MyAdminAlias.servettp.com/fpkmgr
6) remember to close all internet explorer windows when you have finished, and especially if you are not using your own computer…
Thanks TeinturMan
I think your solution above would help a lot.
But I am having a few problems. Hope you can help me out!!
** I use https://jen***.no-ip.org to connect to Accessbook
** I have created https://mybookin***.no-ip.org for the purpose of following your instructions
1) After restarting S80lighttod I get the following error -
2010-03-09 06:57:47: (configfile.c.907) source: cat /opt/etc/lighttpd/conf.d/*.conf line: 69 pos: 1 parser failed somehow near here: (EOL)
2010-03-09 06:57:47: (configfile.c.907) source: /opt/etc/lighttpd/lighttpd.conf line: 334 pos: 1 parser failed somehow near here: (EOL)
2) After following the steps above https://jen***.no-ip.org no longer connects to my Accessbook "Unable to Connect"
3) https://mybookin***.no-ip.org also "Unable to connect"
I thought there would be some problem because I didn't have the line "$SERVER["socket"] == ":8080" {"
Below is my old and new WWW-priv.conf Hope you can help me solve this. Thanks in advance
**Old WWW-priv.conf - **
server.modules += ( "mod_fastcgi" )
server.modules += ( "mod_alias" )
$SERVER["socket"] == ":443" {
server.network-backend = "write"
auth.backend = "htdigest"
dir-listing.activate = "disable"
server.max-write-idle= "3600"
server.upload-dirs= ("/shares/Public/WWW/tmp")
server.document-root = "/shares/Public/WWW/WWW-priv"
auth.backend.htdigest.userfile = "/usr/local/WWW-priv/WebUsers.htdigest.user"
alias.url += ( "/lnks/" => "/usr/local/WWW-priv/lnks/" )
auth.require = ( "/" =>
(
"method" => "digest",
"realm" => "WEB",
"require" => "valid-user"
)
)
accesslog.filename = "/tmp/lighttpd/WWW-priv.log"
fastcgi.server = (
".php" =>
( "localhost" =>
( "socket" => "/tmp/lighttpd/php-fcgi.sock",
"bin-path" => "/opt/bin/php-fcgi",
"max-procs" => 1,
"bin-environment" =>
( "PHP_FCGI_CHILDREN" => "2",
"PHP_FCGI_MAX_REQUESTS" => "1000" )
)
)
)
ssl.engine = "enable"
ssl.pemfile = "/usr/local/WWW-priv/AccessBook.pem"
}
**New WWW-priv.conf - **
server.modules += ( "mod_fastcgi" )
server.modules += ( "mod_alias" )
server.modules += ( "mod_proxy" )
$SERVER["socket"] == ":8080" {
$HTTP["host"] == "mybookin***.no-ip.org" {
proxy.server = ( "" => ( ( "host" => "127.0.0.1" ,
"port" => 80 ) ) )
}
$SERVER["socket"] == ":443" {
server.network-backend = "write"
auth.backend = "htdigest"
dir-listing.activate = "disable"
server.max-write-idle= "3600"
server.upload-dirs= ("/shares/Public/WWW/tmp")
server.document-root = "/shares/Public/WWW/WWW-priv"
auth.backend.htdigest.userfile = "/usr/local/WWW-priv/WebUsers.htdigest.user"
alias.url += ( "/lnks/" => "/usr/local/WWW-priv/lnks/" )
auth.require = ( "/" =>
(
"method" => "digest",
"realm" => "WEB",
"require" => "valid-user"
)
)
accesslog.filename = "/tmp/lighttpd/WWW-priv.log"
fastcgi.server = (
".php" =>
( "localhost" =>
( "socket" => "/tmp/lighttpd/php-fcgi.sock",
"bin-path" => "/opt/bin/php-fcgi",
"max-procs" => 1,
"bin-environment" =>
( "PHP_FCGI_CHILDREN" => "2",
"PHP_FCGI_MAX_REQUESTS" => "1000" )
)
)
)
ssl.engine = "enable"
ssl.pemfile = "/usr/local/WWW-priv/AccessBook.pem"
}
Hi JennyXT,
sorry, i made a mistake it is not 8080, but 443 ….
i have updated my post…
can you modify your www-priv.conf file ?
OMGOMGOMG
You are so amazing it's incredible. Followed your instruction precisely and everything works like a charm.
Just to summarise to others. I can now -
1) Access Network Storage Manager or the FeaturePacks Manager from the web
2) Accessbook still works fine.
This means I can monitor hardrive space, restart mybook world, restart Transmission etc… all away from home.
Thanks again to TeinturMan and gunt76 who have helped me :)