Ajout : DAViCal + CalDavZAP + AgenDAV .
[lhc/ateliers.git] / etc / sv / iodined / remote.sh
diff --git a/etc/sv/iodined/remote.sh b/etc/sv/iodined/remote.sh
new file mode 100755 (executable)
index 0000000..08f41e5
--- /dev/null
@@ -0,0 +1,16 @@
+install -d -m 700 \
+ "$tool"/var/sec \
+ "$tool"/var/sec/iodine
+if test ! -e "$tool"/var/sec/iodine/"$local_iodine_ns".pass.gpg
+ then gpg --encrypt $gpg_options -o "$tool"/var/sec/iodine/"$local_iodine_ns".pass.gpg <<-EOF
+               $(stdbuf --output 0 tr -d -c '[:alnum:][:punct:]' <"${random:-/dev/urandom}" | head -c 32)
+               EOF
+ fi
+
+gpg --decrypt ${gpg_options-} "$tool"/var/sec/iodine/"$local_iodine_ns".pass.gpg |
+"$tool"/remote/ssh root@"$local_fqdn" '
+       set -eux
+       test ! -e /root/.'"$sv"'_pass
+       install -m 400 -o root -g root /dev/stdin \
+        /root/.'"$sv"'_pass
+ '