Auto upgrade acme.sh and log output.
authorGuo Xiang Tan <tgx_world@hotmail.com>
Mon, 27 Mar 2017 03:31:35 +0000 (11:31 +0800)
committerGuo Xiang Tan <tgx_world@hotmail.com>
Mon, 27 Mar 2017 03:31:35 +0000 (11:31 +0800)
templates/web.letsencrypt.ssl.template.yml

index 2811469a00acf7ec40de5ab7018ee235aeec4708..353df0a88c1fbb83ca63b7e5c85bc0b8d4e99adc 100644 (file)
@@ -13,7 +13,8 @@ hooks:
          - cd /root && git clone https://github.com/Neilpang/acme.sh.git && cd /root/acme.sh && git reset --hard c4c5ecd03de497fd4c3079cbac9d3c56edaffc89
          - touch /var/spool/cron/crontabs/root
          - install -d -m 0755 -g root -o root $LETSENCRYPT_DIR
-         - cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --install
+         - cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --install --log "${LETSENCRYPT_DIR}/acme.sh.log"
+         - cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --upgrade --auto-upgrade
 
     - file:
        path: "/etc/nginx/letsencrypt.conf"