danb35
Hall of Famer
- Joined
- Aug 16, 2011
- Messages
- 15,504
Sometimes, the things you think are simple, aren't that simple...
I'm trying to update my script for installing Nextcloud in a jail to use Caddy rather than Apache. In order to use DNS validation for the certs, I need to do something like this in the jail:
...and to make that configurable, I'm putting this in the nextcloud-config file:
...with this later in the script:
Unfortunately, it doesn't seem to be working quite properly. If I add an
...and when it gets to the part of the script that runs the sysrc command, I see this:
I'm kind of stumped here--any suggestions?
I'm trying to update my script for installing Nextcloud in a jail to use Caddy rather than Apache. In order to use DNS validation for the certs, I need to do something like this in the jail:
Code:
sysrc caddy_env="CLOUDFLARE_EMAIL=me@domain.com CLOUDFLARE_API_KEY=my_api_key"
...and to make that configurable, I'm putting this in the nextcloud-config file:
Code:
DNS_ENV='"CLOUDFLARE_EMAIL=foo@bar.baz CLOUDFLARE_API_KEY=blah"'
...with this later in the script:
Code:
iocage exec ${JAIL_NAME} sysrc caddy_env=${DNS_ENV}
Unfortunately, it doesn't seem to be working quite properly. If I add an
echo $DNS_ENV
to the script, I get output like this:Code:
DNS_ENV is "CLOUDFLARE_EMAIL=foo@bar.baz CLOUDFLARE_API_KEY=blah" [: "CLOUDFLARE_EMAIL=foo@bar.baz: unexpected operator
...and when it gets to the part of the script that runs the sysrc command, I see this:
Code:
caddy_enable: -> YES caddy_cert_email: -> foo@bar.baz caddy_env: -> /usr/sbin/sysrc: cannot create : No such file or directory
I'm kind of stumped here--any suggestions?