Introduction
Introduction Statistics Contact Development Disclaimer Help
vhosting.cgi - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
vhosting.cgi (488B)
---
1 #!/bin/sh
2 #
3 # Some gopher daemons try to emulate some vhosting, by checking, if some
4 # request path only exists in some directory of a specific host.
5 #
6
7 basevhosts="/gopher/vhosts"
8
9 for i in $(find "${basevhosts}" -maxdepth 1 -type d);
10 do
11 # Check if request exists in some vhost dir.
12 if [ -e "${i}/${2}" ];
13 then
14 vhost="$(basename "${i}")"
15 printf "Our vhost is %s!\n" "${vhost}"
16 printf "Thank you for flying gopher airlines!\n"
17
18 # Serve content accordingly.
19
20 exit 0
21 fi
22 done
23
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.