forked from vern/website
Silence s-nail & add go home/go back buttons
This commit is contained in:
parent
4431d9ec39
commit
e6afd08674
|
@ -35,6 +35,8 @@ set | grep ^FORM > /home/ak/test
|
|||
sshurl=$(echo $FORM_ssh | curl -s -F'file=@-;' https://envs.sh)
|
||||
if [[ $VALID_EMAIL == 1 ]] && [[ $VALID_USERNAME == 1 ]] && [[ $VALID_SSH == 1 ]]; then
|
||||
echo "<br>Signup Request has been submitted. More information will be sent to $FORM_email after it is approved.<br>"
|
||||
echo '<a href=/index.html>🔙 Go home</a>'
|
||||
|
||||
MAILNUM=$RANDOM
|
||||
echo "Subject: New membership request from $FORM_username <$FORM_email>" > /tmp/membershipemail$MAILNUM
|
||||
echo "Hello Administrators," >> /tmp/membershipemail$MAILNUM
|
||||
|
@ -42,5 +44,7 @@ if [[ $VALID_EMAIL == 1 ]] && [[ $VALID_USERNAME == 1 ]] && [[ $VALID_SSH == 1 ]
|
|||
echo "SSH Keys: $sshurl" >> /tmp/membershipemail$MAILNUM
|
||||
echo "Services requested: $FORM_git $FORM_fedi $FORM_matrix" >> /tmp/membershipemail$MAILNUM
|
||||
printf "\nReason for join request: \n $FORM_reason\n" >> /tmp/membershipemail$MAILNUM
|
||||
cat /tmp/membershipemail$MAILNUM | s-nail -v -r "mememail@vern.cc" -s "$(head -n1 /tmp/membershipemail$MAILNUM | cut -c9-)" $adminmails
|
||||
cat /tmp/membershipemail$MAILNUM | s-nail -v -r "mememail@vern.cc" -s "$(head -n1 /tmp/membershipemail$MAILNUM | cut -c9-)" $adminmails &> /dev/null
|
||||
else
|
||||
echo '<h1> <a href=/signup>some details were wrong/missing. please check and redo the form</a> </h1>'
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue