cfbot

command module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

cfbot

Overview PkgGoDev Go Report Card

CFbot is a CLI application for Cloudflare that helps you automate getting certificates from Cloudflare.

Install

go get github.com/syook/cfbot

Example

sudo cfbot --init --auth <cloudflare CA token> --hostnames "*.example.com,example.com"  --validity 7 -p <postRenewCommand (example: nginx -s reload)> -e <onErrorCommand (example: curl slack) >

A more specific example

sudo cfbot --init --auth <cloudflare CA token> -p "/home/deploy/reboot-nginx-docker.sh" -e "/home/deploy/cfbot-on-error.sh" --hostnames "<comma separated hostnames>" -v 7
The above command does the following.
  • Initializes all the necessary folder paths.
    • /etc/cfbot
  • Fetches the first set of certificates from cloudflare and saves them in /etc/cfbot/live
  • runs the provided post renew command (PS: the command is executed in a bash shell)
  • Saves the current config for further use in /etc/cfbot/cfbot.json
  • Adds a cron which runs twice a day and gets new certificates if the existing ones are about to expire in 48 hours.

PS

The service needs sudo permissions to access the /etc directory and also to add the cron job under /etc/cron.d

License

Apache 2.0.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL