You are not logged in.
Environmental variables in question are:
export FAKETIME="2017-07-03 21:00:00"
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
I have libfaketime installed, and I would like to change time in apache2 for debugging purposes. I tried to put these vars into /usr/sbin/envvars and /usr/sbin/envvars-std but to no vail. Apache doesn't seem to have access to these variables after restarting by using systemd. Where should they be put?
Last edited by luken (2017-07-04 19:26:52)
Offline
How are you starting apache? Those just need to be exported from the parent process of whatever is starting the apache server - for debugging, I'd just do this from a shell. But if you are using httpd.service, you'd need to add an Environment= parameter to the service file.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks Trilby!
It worked, what I did was creating a file: "/etc/systemd/system/httpd.service.d/override.conf" with a content:
[Service]
Environment="FAKETIME=2017-07-03 21:00:00"
Environment="LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1"
And after reloading systemd and restarting httpd, I had a fake time that I wanted .
Last edited by luken (2017-07-04 19:27:36)
Offline