[Semibug] Setting environment variables

Mike Wayne semibug15 at post.wayne47.com
Wed Aug 9 15:57:13 EDT 2023

On Wed, Aug 09, 2023 at 03:34:42PM -0400, Mark Moellering wrote:
> Everyone,
> I have come across an issue which should be incredibly common, yet I 
> have not found a single clear cut answer on it.
> I am running dehydrated on a mail server, in a jail.?? To run, I need to 
> set environment variables.?? While I can easily set the variables via the 
> command line, I want to be able to run the command via a cronjob, and 
> would prefer to have the environment variables set via a script, so I 
> don't have to worry about them being unset, if the server or jail get 
> rebooted.

You can create a script and do everything there. Test your script in a subshell that
sets path to "/usr/bin:/bin"


* * * * * user source ~/.file_that_sets_env_vars; comand-that-requires-env-vars

More information about the Semibug mailing list