Add invite friend script

This commit is contained in:
Nico Schottelius 2019-09-10 02:47:44 +09:00
parent de0ac87ec5
commit a487bac8c2
2 changed files with 41 additions and 0 deletions

View file

@ -31,6 +31,7 @@ To become a real IPv6 friend, you need to do the following things:
- For each of your friends, check whether they are online
- Import the friends of your friends and check whether they are
online, too!
- Send friend requests (like other platforms!)
### Example: Generating a key with the right comment
@ -196,6 +197,17 @@ automates this process.
You can probably just use your mail program for that - and you might
even be able to send it IPv6 only!
### Example: Invite a friend
Live is not great without friends! Let's invite a friend! This is as
easy is this:
```
printf 'Hello yournamehere!\n I am looking for real IPv6 friends.\n You find my friends on https://nico.ungleich.cloud/rifkeys.\nHow real IPv6 friends find each other is explained on https://code.ungleich.ch/nico/rif.\n Looking forward to befriend you!' | mail -s "friend request" ipv6@your.friend.example.com
```
And obviously this is waaaaaaaaay to long to type, so
## Finding friends
As real IPv6 friends are decentralised, there is no central registry

29
rif-invitefriend.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/sh
# 2019-09-10, Nico Schottelius, Seoul
if [ $# -ne 4 ]; then
echo "$0: <friendname> <friendemail> <your URL> <your name>"
echo 'F.i. $0 nico ipv6@nico.ungleich.cloud https://your-url.example.com'
exit 1
fi
friend=$1; shift
email=$1; shift
url=$1; shift
name=$1; shift
keyurl=$url/rifkeys
projecturl=https://code.ungleich.ch/nico/rif
cat <<EOF | mail -s "Real IPv6 friend request" "${email}"
Hello ${friend},
I want to invite you to become my real IPv6 friend.
You can find my friends including my key on ${keyurl}.
On $projecturl you can find out how to become my friend.
Looking forward to hearing from you,
$name
EOF