I have installed certbot with the nginx module. Today I noticed that the cron that is installed automatically did not work. The cronjob in question is
/etc/cron.d/certbot
and the content was
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew
I debugged the script
test -x /usr/bin/certbot
echo $?
0
test -x /usr/bin/certbot -a \! -d /run/systemd/system
echo $?
1
and looked at the man-page for test. \! does not seems to be a valid argument for the -a flag.
I was able to run the cronjob using
0 */12 * * * root test -x /usr/bin/certbot -a -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew
My question is: what does the \! do and has it always been there?
I'm using
certbot 0.26.1
nginx version: nginx/1.14.0
Ubuntu 16.04.5