wurmlab / sequenceserver

Intuitive graphical web interface for running BLAST bioinformatics tool (i.e. have your own custom NCBI BLAST site!)
https://sequenceserver.com
GNU Affero General Public License v3.0
270 stars 113 forks source link

Show hostname and alternate IPs on startup. #143

Closed yannickwurm closed 5 years ago

yannickwurm commented 9 years ago

On startup, seqserv shows:

Yannick@n56-164 ~/g/p/sequenceserver> sequenceserver                                                                                                                     gh-pages!?
[2015-02-24 16:49:37] WARN  Will listen on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--host option).
** SequenceServer is ready.
   Go to http://0.0.0.0:4567 in your browser and start BLASTing!
   Press CTRL+C to quit.

If should additionally show the other possible hostnames/IPs (e.g. http://n56-164.sbcs.qmul.ac.uk:4567). For example these can be obtained here:

   require 'socket'
   Socket.ip_address_list

This will greatly facilitate sharing.

yeban commented 9 years ago

Return value of Socket.ip_address_list will need filtering. See - http://stackoverflow.com/a/7809076.

Hostname will have to be derived via reverse DNS lookup. Easy if /etc/resolv.conf is correctly set. See - http://stackoverflow.com/a/5544777.

yeban commented 9 years ago

@IsmailM I wonder if this one will interests you.