]> git.netwichtig.de Git - user/henk/code/shell/rif.git/commitdiff
Also export friends
authorNico Schottelius <nico@nico-notebook.schottelius.org>
Mon, 9 Sep 2019 17:12:31 +0000 (02:12 +0900)
committerNico Schottelius <nico@nico-notebook.schottelius.org>
Mon, 9 Sep 2019 17:12:31 +0000 (02:12 +0900)
README.md
rif-exportfriends.sh [new file with mode: 0755]

index 050f0bb523cc8e42e69273745f7b170275b86f1a..712500433ec9bf5ebeba2265619e4d9d2440ddc0 100644 (file)
--- a/README.md
+++ b/README.md
@@ -157,7 +157,26 @@ exported keys! We import friends directly from the URL of a friend:
 curl -6 -s https://nico.ungleich.cloud/rifkeys | gpg --import
 ```
 
-You can also use
+You can also use the included rif-importfriends.sh.
+
+### Example: Updating your friends
+
+Now that you have imported the friends of your friends, they have
+automatically also become your friends!
+
+Obviously, you will want to check whether you even want to sign some
+of the friends (keys) that you downloaded, but clearly you want to
+show off with the biggest amount of friends (that's what is most
+important anyway, isn't it?).
+
+In any case, to update your friend list, simply repeat the command you
+ran above already in the beginning:
+
+```
+gpg -a --export RIF > /var/www/html/rifkeys
+```
+
+Or use the included `rif-exportfriends.sh`
 
 ### Example: Sending a message to a friend
 
diff --git a/rif-exportfriends.sh b/rif-exportfriends.sh
new file mode 100755 (executable)
index 0000000..0014a8b
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+# 2019-09-10, Nico Schottelius, Seoul
+
+if [ $# -ne 1 ]; then
+    echo "$0: <webserver directory>"
+    echo 'Export your friends to the web!'
+    exit 1
+fi
+
+dir=$1; shift
+keys="$dir/rifkeys"
+
+gpg -a --export RIF > "$keys"
+
+# Ensure everyone can read them
+chmod 0644 "$keys"