source: n4d-ldap/trunk/fuentes/install/usr/sbin/n4d-ldap-generator-ssl @ 149

Last change on this file since 149 was 149, checked in by hectorgh, 4 years ago

adding project files

  • Property svn:executable set to *
File size: 436 bytes
Line 
1#!/bin/bash
2#
3# Licensed under GPL v3 or higher
4#
5
6
7kill -9 $(cat /var/run/rngd.pid) 2> /dev/null || true
8r=$[ ( $RANDOM % 10 ) + 1 ]
9rngd -r /dev/urandom -t $r
10echo $r
11[ -d /etc/ldap/ssl ] || mkdir -p /etc/ldap/ssl || true 
12openssl req -new -newkey rsa:4096 -days 0 -nodes -x509 -subj "/C=ES/ST=VALENCIA/L=LliureX/O=server/CN=$(hostname)" -keyout /etc/ldap/ssl/slapd.key  -out /etc/ldap/ssl/slapd.cert
13kill -9 $(cat /var/run/rngd.pid)
Note: See TracBrowser for help on using the repository browser.