TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.25k stars 418 forks source link

DOTNET_CLI_HOME error in systemd script after upgrade from v4 to v4.1 #116

Closed Chewie9999 closed 4 years ago

Chewie9999 commented 4 years ago

Today I upgraded from v4 to v4.1 of Technitium DNS. This required an update of the .NET Core from v3.0 to v3.1 via yum, which completed successfully. Since this, the systemd start script doesn't work on boot up any more, and I get the following listed in my logs:

Jan 25 17:14:56 localhost.localdomain start.sh[1021]: The user's home directory could not be determined. Set the 'DOTNET_CLI_HOME' environment variable to specify the directory to use.
Jan 25 17:14:56 localhost.localdomain systemd[1]: TechnitiumDNS.service: main process exited, code=exited, status=1/FAILURE
Jan 25 17:14:56 localhost.localdomain systemd[1]: Unit TechnitiumDNS.service entered failed state.
Jan 25 17:14:56 localhost.localdomain systemd[1]: TechnitiumDNS.service failed.

Running start.sh as root manually works fine. Could this be a problem with my distro's version of .NET? I am running it on CentOS 7.6.

ShreyasZare commented 4 years ago

Thanks for the feedback. It could be distro specific issue where the DOTNET_CLI_HOME env variable is not set. I guess you can just edit the systemd service and set the variable and see if that works.