Closed seth100 closed 2 years ago
If you are using the systemd service the recommended place to have your custom header is /etc/hblock/header
.
The reason why even specifying the HBLOCK_HEADER_FILE
variable produces an error is because for security reasons the service has ProtectHome=yes
set.
oh I see, got it! Thank you for confirming that and thanks for your work!
Describe the bug: I added some custom lines in
~/.config/hblock/header
and they are taken only when manually executinghblock
. If it's executed via systemd service, that file is ignored and my custom lines not added to the final/etc/hosts
file!Steps to reproduce: Create
~/.config/hblock/header
file and add your custom lines in it. Then runhblock
and you'll see those lines in the/etc/hosts
file. Then wait for systemd task to be executed or just restart the system, the final/etc/hosts
file will not contain custom lines.Expected behavior: I expect the final
/etc/hosts
file to have my custom lines (from~/.config/hblock/header
)Environment:
Additional context: I tried to create
/etc/systemd/system/hblock.service.d/override.conf
and to add:and, after reloading deamon and restarting
hblock.service
I got an error:(I also tried to use the absolute path:
Environment=HBLOCK_HEADER_FILE=${XDG_CONFIG_HOME}/hblock/header
, but same result and similar error).