Reputation: 4687
Is where any way to achieve this?
Some details:
I am trying to create log file for gunicorn with datetime in name.
Something like that, but it isn't works properly:
chdir /home/mypath
script
log_file=./err_$(date +"%d_%m_%Y_%T").log
exec gunicorn --error-logfile $log_file
end script
This approach fails too:
exec gunicorn --error-logfile ./err_$(date +"%d_%m_%Y_%T").log
Upvotes: 0
Views: 519
Reputation: 532303
For some reason, the shell started by the script
stanza is unable to find the date
command in its path. Use a hardcoded path:
script
log_file=./err_$(/bin/date +"%d_%m_%Y_%T").log
gunicorn --error-logfile $log_file
end script
Upvotes: 1