support HE #1

Closed
opened 2024-07-27 08:17:44 +00:00 by psykose · 1 comment

uacme script for reference

sakura [~]$ cat /usr/local/bin/he-dns-01 
#!/bin/sh

METHOD=$1
TYPE=$2
IDENT=$3
TOKEN=$4
AUTH=$5
. /usr/local/share/he-password

begin_challenge() {
    curl https://dyn.dns.he.net/nic/update \
        -d "hostname=_acme-challenge.$1" \
        -d "password=$HE_PASSWORD" \
        -d "txt=$2" &>/dev/null
}

finish_challenge() {
    curl https://dyn.dns.he.net/nic/update \
        -d "hostname=_acme-challenge.$1" \
        -d "password=$HE_PASSWORD" \
        -d "txt=none" &>/dev/null
}

case "$METHOD" in
    "begin")
        case "$TYPE" in
            dns-01)
	       begin_challenge $IDENT $AUTH
                exit $?
                ;;
            *)
                exit 1
                ;;
        esac
        ;;

    "done"|"failed")
        case "$TYPE" in
            dns-01)
                finish_challenge $IDENT
                ;;
            *)
                exit 1
                ;;
        esac
        ;;

    *)
        echo "$0: invalid method" 1>&2
        exit 1
esac

not sure how to map this here etc but just leaving it as a todo ig

uacme script for reference ```sh sakura [~]$ cat /usr/local/bin/he-dns-01 #!/bin/sh METHOD=$1 TYPE=$2 IDENT=$3 TOKEN=$4 AUTH=$5 . /usr/local/share/he-password begin_challenge() { curl https://dyn.dns.he.net/nic/update \ -d "hostname=_acme-challenge.$1" \ -d "password=$HE_PASSWORD" \ -d "txt=$2" &>/dev/null } finish_challenge() { curl https://dyn.dns.he.net/nic/update \ -d "hostname=_acme-challenge.$1" \ -d "password=$HE_PASSWORD" \ -d "txt=none" &>/dev/null } case "$METHOD" in "begin") case "$TYPE" in dns-01) begin_challenge $IDENT $AUTH exit $? ;; *) exit 1 ;; esac ;; "done"|"failed") case "$TYPE" in dns-01) finish_challenge $IDENT ;; *) exit 1 ;; esac ;; *) echo "$0: invalid method" 1>&2 exit 1 esac ``` not sure how to map this here etc but just leaving it as a todo ig
Author

added

added
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ptrcnull/nyacme#1
No description provided.