15 lines
443 B
Bash
15 lines
443 B
Bash
#!/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 |