Bots and Simulations > Evolution and Internet Sharing Sims

Linux Internet Sharing

(1/1)

MacadamiaNuts:
If you don't mind, I'll keep this thread for the blueprints about how to use Linux command-line scripts to set up FTP sharing.  

This is what I've got for now.

This pattern goes in a file called .netrc, with permissions set with chmod go-rwx, at home/username


--- Quote ---machine  anyserver.anynet.net
login    username
password blahblah
--- End quote ---

These two Linux scripts, put in the sharing folder, retrieve and upload dbo files from and to the FTP server. This would work with the organisms cached by offline teleporters. I still don't know how to limit the amount of files uploaded and downloaded, besides setting a small size limit for the FTP account.

dbupload

--- Quote ---#! /bin/sh
sudo ftp <<**
open anyserver.anynet.net
cd darwinbots
bin
mput *.dbo
bye
**
rm ./*.dbo
--- End quote ---

dbdownload

--- Quote ---#! /bin/sh
sudo ftp <<**
open anyserver.anynet.net
cd darwinbots
bin
mget *.dbo
mdelete *.dbo
bye
**
--- End quote ---

Both them need to be made executable with chmod ugo+x. This would already work as "manual ftp sharing", if I didn't miss anything I should know about the ftp command.

Now, I would need to figure how to loop them.

MacadamiaNuts:
Got it under wine!

I downloaded a native copy of wininet, ran wincfg and specified wininet to be run as native. (Also ran wine as root, just in case), and the sim is connected now.    

Navigation

[0] Message Index

Go to full version