feat: signal failure
This commit is contained in:
parent
43ac0ece5b
commit
5b352b230f
1 changed files with 9 additions and 1 deletions
10
certbotd.sh
10
certbotd.sh
|
@ -23,6 +23,7 @@ fi
|
|||
|
||||
lock=/tmp/certbot.lck
|
||||
updated=/tmp/certbot.updated
|
||||
failed=/tmp/certbot.failed
|
||||
domains=/tmp/domains
|
||||
|
||||
ensure() {
|
||||
|
@ -46,6 +47,9 @@ ensure() {
|
|||
# Remove the lock after synchronization
|
||||
rm -f "${lock}"
|
||||
|
||||
# Remove the failure status
|
||||
rm -f "${failed}"
|
||||
|
||||
# Exit with the error code
|
||||
exit $1
|
||||
}
|
||||
|
@ -190,4 +194,8 @@ case $1 in
|
|||
done
|
||||
esac
|
||||
|
||||
ensure 0
|
||||
if test -f "${failed}" ; then
|
||||
ensure 255
|
||||
else
|
||||
ensure 0
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue