]> git.netwichtig.de Git - user/henk/code/shell/rif.git/blobdiff - rif-exportfriends.sh
Also export friends
[user/henk/code/shell/rif.git] / rif-exportfriends.sh
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"