Commit 257c9a75 authored by Eric Zhang's avatar Eric Zhang Committed by GitHub

Add Snap support (#11)

parent 04bbd26e
......@@ -2,32 +2,30 @@
A certbot dns plugin to obtain certificates using dnspod.
## Obtain API Token
[https://www.dnspod.cn/console/user/security](https://www.dnspod.cn/console/user/security)
## Install
Pip:
```bash
git clone https://github.com/tengattack/certbot-dns-dnspod
cd certbot-dns-dnspod
sudo python setup.py install
sudo pip install git+https://github.com/tengattack/certbot-dns-dnspod.git
```
If you are using `certbot-auto`, you should run `virtualenv` first:
Snap:
```bash
# CentOS 7
virtualenv --no-site-packages --python "python2.7" "/opt/eff.org/certbot/venv"
/opt/eff.org/certbot/venv/bin/python2.7 setup.py install
sudo snap install certbot-dns-dnspod
sudo snap set certbot trust-plugin-with-root=ok
sudo snap connect certbot:plugin certbot-dns-dnspod
```
## Credentials File
```ini
certbot_dns_dnspod:dns_dnspod_api_id = 12345
certbot_dns_dnspod:dns_dnspod_api_token = 1234567890abcdef1234567890abcdef
dns_dnspod_api_id = 12345
dns_dnspod_api_token = 1234567890abcdef1234567890abcdef
```
```bash
......@@ -38,8 +36,8 @@ chmod 600 /path/to/credentials.ini
## Obtain Certificates
```bash
certbot certonly -a certbot-dns-dnspod:dns-dnspod \
--certbot-dns-dnspod:dns-dnspod-credentials /path/to/credentials.ini \
certbot certonly -a dns-dnspod \
--dns-dnspod-credentials /path/to/credentials.ini \
-d example.com \
-d "*.example.com"
```
This diff is collapsed.
name: certbot-dns-dnspod
summary: DNSPod DNS Authenticator plugin for Certbot
version: '0.24.1'
description: A certbot dns plugin to obtain certificates using dnspod. For information on how to set up, go to the GitHub page.
website: https://github.com/ericzhang456/certbot-dns-dnspod # TODO (after merge): change url to https://github.com/tengattack/certbot-dns-dnspod
license: Apache-2.0
confinement: strict
grade: stable
base: core20
adopt-info: certbot-dns-dnspod
architectures:
- build-on: arm64
- build-on: amd64
parts:
certbot-dns-dnspod:
plugin: python
source: .
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- PIP_CONSTRAINT: $SNAPCRAFT_PART_SRC/snap-constraints.txt
- SNAP_BUILD: "True"
requirements:
- snap-requirements.txt
build-packages:
- gcc
- git
- build-essential
- libssl-dev
- libffi-dev
- python3-dev
certbot-metadata:
plugin: dump
source: .
stage: [setup.py, certbot-shared]
override-pull: |
snapcraftctl pull
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.8/site-packages
plugs:
certbot-metadata:
interface: content
content: metadata-1
target: $SNAP/certbot-shared
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment