Update ChaosVPN
[packages.git] / net / chaosvpn / files / chaosvpn_config.sh
diff --git a/net/chaosvpn/files/chaosvpn_config.sh b/net/chaosvpn/files/chaosvpn_config.sh
new file mode 100644 (file)
index 0000000..6b3b273
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+[ -f "/etc/tinc/chaos/rsa_key.pub" -a -f "/etc/tinc/chaos/rsa_key.priv" ] || {
+       echo "please generate rsa key pair"
+       echo "tincd -n chaos --generate-keys=2048"
+       exit 1
+}
+
+C=`grep unconfigured_please_change_me /etc/tinc/chaosvpn.conf  | wc -l`
+[ "$C" = "0" ] || {
+       echo "/etc/tinc/chaosvpn.conf is not configured yet"
+       exit 1
+}
+exit 0