Skip to content

bash: heroku: command not found #1

Description

@jerinpetergeorge

Everything was perfect, except this line -

acm/cert.sh

Line 29 in b5085d4

heroku certs:update "/app/.acme.sh/$DOMAIN/fullchain.cer" "/app/.acme.sh/$DOMAIN/$DOMAIN.key" --confirm $HEROKU_APP --app $HEROKU_APP

It seems the dyno couldn't find the Heroku binary. How can I run the command successfully?

The script that I have used

#!/bin/sh
set -e

# NEEDS THE FOLLOWING VARS IN ENV:
# DOMAIN
# CLOUDFLARE_TOKEN
# CLOUDFLARE_ACCOUNT_ID
# HEROKU_API_KEY
# HEROKU_APP

git clone https://github.com/Neilpang/acme.sh.git
cd ./acme.sh

# Force ensures it doesnt fail because of lack of cron
./acme.sh --install --force

# Map to environment variables that the ACME script requires
export CF_Token=$CLOUDFLARE_TOKEN
export CF_Account_ID=$CLOUDFLARE_ACCOUNT_ID

# Generate wildcard certificate (this will take approx 130s)
~/.acme.sh/acme.sh --server letsencrypt --issue -d $DOMAIN  -d "*.$DOMAIN"  --dns dns_cf

# Update the certificate in the live app
heroku certs:update "/app/.acme.sh/$DOMAIN/fullchain.cer" "/app/.acme.sh/$DOMAIN/$DOMAIN.key" --confirm $HEROKU_APP --app $HEROKU_APP

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions