aboutsummaryrefslogtreecommitdiffstats
path: root/nocompile
diff options
context:
space:
mode:
Diffstat (limited to 'nocompile')
-rwxr-xr-xnocompile/bin/mime-type4
-rwxr-xr-xnocompile/bin/rdns2
-rwxr-xr-xnocompile/libexec/gopherd.sh2
3 files changed, 5 insertions, 3 deletions
diff --git a/nocompile/bin/mime-type b/nocompile/bin/mime-type
index 71982d9..2b1bad0 100755
--- a/nocompile/bin/mime-type
+++ b/nocompile/bin/mime-type
@@ -4,10 +4,10 @@ MAIN="$(echo "${TYPE}" | cut -d/ -f1)"
SUB="$(echo "${TYPE}" | cut -d/ -f2)"
if [ "_${MAIN}" = "_inode" ];then
printf "text/plain\r\n"
- printf "this is a directory or symlink! wtf?!?"
+# printf "this is a directory or symlink! wtf?!?" #ssssshhhhh
TYPE="text/plain"
fi
-if [ "_${MAIN}" = "_text" -a "_${SUB}" != "_html"];then
+if [ "_${MAIN}" = "_text" -a "_${SUB}" != "_html" ];then
TYPE="text/plain"
fi
printf "%s\r\n" "$TYPE"
diff --git a/nocompile/bin/rdns b/nocompile/bin/rdns
new file mode 100755
index 0000000..347e416
--- /dev/null
+++ b/nocompile/bin/rdns
@@ -0,0 +1,2 @@
+#!/bin/sh
+dig +short -x "$1" | head -n1 | rev | tail -c+2 | rev
diff --git a/nocompile/libexec/gopherd.sh b/nocompile/libexec/gopherd.sh
index 768d02b..0b87223 100755
--- a/nocompile/libexec/gopherd.sh
+++ b/nocompile/libexec/gopherd.sh
@@ -10,7 +10,7 @@ if grep -v "^${base}" <<< "${realpath}" > /dev/null;then
exit 1
fi
myIP=$(/usr/local/bin/hop0 $(/usr/local/libexec/peerip))
-hostname=$(dig -x ${myIP} +short | head -n1 | rev | tail -c+2 | rev )
+hostname=$(rdns ${myIP})
if [ ! "${hostname}" ]; then
hostname=${myIP}
else