post-install: add the date into the ldif generated file

This commit is contained in:
Jérémy Dubois 2022-04-13 17:26:59 +02:00
parent 46b9baf601
commit e1ae8fefb9
1 changed files with 5 additions and 3 deletions

View File

@ -35,8 +35,10 @@ opensshFingerprintECDSA=$(ssh-keyscan -t ecdsa-sha2-nistp256 localhost 2>/dev/nu
Fingerprint="${opensshFingerprintRSA}${opensshFingerprintRSA:+;}"\
"${opensshFingerprintED25519}${opensshFingerprintED25519:+;}${opensshFingerprintECDSA}"
cat<<EOT>/root/${EvoComputerName}.ldif
# ldapvi --profile evolix --add --in ${EvoComputerName}.ldif
ldif_file="/root/${EvoComputerName}.$(date +"%Y%m%d%H%M%S").ldif"
cat<<EOT>${ldif_file}
# ldapvi --profile evolix --add --in ${ldif_file}
dn: EvoComputerName=${EvoComputerName},ou=computer,dc=evolix,dc=net
dnsArecord: $EvoComputerName
@ -149,7 +151,7 @@ ServiceVersion: packetfilter
EOT
if egrep -q 'sd.*RAID' /var/run/dmesg.boot; then
cat<<EOT>>/root/${EvoComputerName}.ldif
cat<<EOT>>${ldif_file}
dn: ServiceName=bioctl,EvoComputerName=${EvoComputerName},ou=computer,dc=evolix,dc=net
objectClass: EvoService
NagiosEnabled: TRUE