This commit is contained in:
2024-05-13 18:45:49 +02:00
parent 3caab05764
commit bfb1f22217
5 changed files with 115 additions and 0 deletions

15
watch-csr.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
watch-folder="/etc/ssl/CA"
while true; do
csr-file=$(inotifytwait -q -e create --format '%f' "${watch-folder}")
if ["${csr-file}" ]; then
echo " * Fichier recu"
config-file=$(inotifytwait -q -e create --format '%f' "${watch-folder}")
if ["${config-file}" ]; then
echo " * Fichier recu"
/bin/sh /etc/ssl/CA/sign-certificate.sh "${watch-folder}/${csr-file}" ${watch-folder}/${config-file}" "${csr-file}"
fi
fi
done