xmpp-invitation-page/invitation.cgi

21 lines
392 B
Plaintext
Raw Normal View History

2021-07-11 11:54:18 +02:00
#! /bin/sh
USERNAME=$(basename ${REQUEST_URI})
2021-07-23 10:09:35 +02:00
DOMAIN=$(echo "${USERNAME}" | cut -d@ -f2)
if [ "${USERNAME}" = "${DOMAIN}" ]; then
USER_JID=${USERNAME}@chapril.org
else
USER_JID=${USERNAME}
fi
2021-07-11 11:54:18 +02:00
echo "Content-type: text/html"
echo ""
2021-07-23 10:09:35 +02:00
#echo "<pre>USERNAME=${USERNAME}" ; echo "DOMAIN=$DOMAIN" ; echo "</pre>" # DEBUG
2021-07-11 11:54:18 +02:00
2021-07-23 10:09:35 +02:00
cat index.html.tpl | sed "s/{{user_jid}}/${USER_JID}/g"
2021-07-11 11:54:18 +02:00
exit 0