summaryrefslogtreecommitdiffstats
path: root/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'postinst')
-rw-r--r--postinst8
1 files changed, 8 insertions, 0 deletions
diff --git a/postinst b/postinst
index 3ed2a8b..3a705fe 100644
--- a/postinst
+++ b/postinst
@@ -25,6 +25,14 @@ case "$1" in
$USER
echo "..done"
fi
+ if [ ! -f /etc/mandaye-meyzieu/certs/saml.crt -a ! -f /etc/mandaye-meyzieu/certs/saml.key ]; the
+ echo -n "Generating key material..." >&2
+ openssl genpkey -algorithm rsa -pkeyopt rsa_keygen_bits:2048 -out /etc/mandaye-meyzieu/certs/saml.key >&2
+ openssl req -x509 -new -out /etc/mandaye-meyzieu/certs/saml.crt -subj '/CN=whocares' -key /etc/mandaye-meyzieu/certs/saml.key -days 3650 >&2
+ chown root:$GROUP /etc/mandaye-meyzieu/certs/saml.crt /etc/mandaye-meyzieu/certs/saml.key
+ chmod 640 /etc/mandaye-meyzieu/certs/saml.crt /etc/mandaye-meyzieu/certs/saml.key
+ echo "..done" >&2
+ fi
echo -n "Fixing permissions.."
chown $USER:$GROUP /var/lib/$NAME /var/run/$NAME /var/log/$NAME