auto generate saml key
This commit is contained in:
parent
1b3f4144c5
commit
0630b07467
1
dirs
1
dirs
|
@ -1,3 +1,4 @@
|
|||
etc/mandaye-meyzieu
|
||||
etc/mandaye-meyzieu/certs
|
||||
etc/mandaye-meyzieu/sites-available
|
||||
etc/mandaye-meyzieu/sites-enabled
|
||||
|
|
8
postinst
8
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
|
||||
|
|
Reference in New Issue