$SCRIPTDIR/config #400

Closed
opened 2025-12-29 01:24:27 +01:00 by adam · 2 comments
Owner

Originally created by @nagstaku on GitHub (Jan 31, 2019).

This is probably me mis-understanding something, if so I apologize, but hopefully someone else experiencing the same can benefit from this too.

When I create my container, I pass in an environment var:

`-e "SCRIPTDIR=/root/dehdrated/configs/"

and then I mount a folder that includes both my config and domains.txt file:

`-v ./configs:/root/dehydrated/configs/"

but when I issue the command, dehydrated isn't able to locate my config file? Yet, if I launch into a bash for the container when I start it, issuing:

cat $SCRIPTDIR/config will produce my whole config file ??

So am I interpreting this incorrectly?

# This file is looked for in the following locations:  #
# $SCRIPTDIR/config (next to this script) 
# /usr/local/etc/dehydrated/config 

Everything works fine if I mount my configs into /usr/local/etc/dehydrated

(and my reason for trying to mount it in a custom directory is so that I don't get files written back into the host, which happens at /usr/local/etc/dehydrated... although I'm not sure that matters.)

Originally created by @nagstaku on GitHub (Jan 31, 2019). This is probably me mis-understanding something, if so I apologize, but hopefully someone else experiencing the same can benefit from this too. When I create my container, I pass in an environment var: `-e "SCRIPTDIR=/root/dehdrated/configs/" and then I mount a folder that includes both my config and domains.txt file: `-v ./configs:/root/dehydrated/configs/" but when I issue the command, dehydrated isn't able to locate my config file? Yet, if I launch into a bash for the container when I start it, issuing: `cat $SCRIPTDIR/config` will produce my whole config file ?? So am I interpreting this incorrectly? ``` # This file is looked for in the following locations: # # $SCRIPTDIR/config (next to this script) # /usr/local/etc/dehydrated/config ``` Everything works fine if I mount my configs into /usr/local/etc/dehydrated (and my reason for trying to mount it in a custom directory is so that I don't get files written back into the host, which happens at /usr/local/etc/dehydrated... although I'm not sure that matters.)
adam closed this issue 2025-12-29 01:24:27 +01:00
Author
Owner

@jobe1986 commented on GitHub (Feb 1, 2019):

dehydrated sets $SCRIPTDIR to be the directory in which the dehydrated script itself is located.

If you wish to supply the path to a config file at run time then use --config /path/to/config/file

You can then supply the path to domains.txt in the specified config file.

@jobe1986 commented on GitHub (Feb 1, 2019): dehydrated sets $SCRIPTDIR to be the directory in which the dehydrated script itself is located. If you wish to supply the path to a config file at run time then use --config /path/to/config/file You can then supply the path to domains.txt in the specified config file.
Author
Owner

@nagstaku commented on GitHub (Feb 1, 2019):

Oh, awesome, that makes sense 👍

@nagstaku commented on GitHub (Feb 1, 2019): Oh, awesome, that makes sense 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#400