Chris-D-Turk / Valheim.Google.Cloud

34 stars 2 forks source link

error when starting deamon #6

Closed Stanley-Yao closed 1 year ago

Stanley-Yao commented 1 year ago

Hi, first of all, I want to thank you for writing this nice guide for the new players! I followed your steps, but there is some error when I started the daemon, there must be something wrong with the path. I named everything exactly you did in the guide. I have verified that I have valheim.sh and valheim_init.sh in the folder /etc/init.d

Any ideas?

Jan 02 18:13:25 valheim systemd[64181]: valheim.service: Failed to execute /etc/init.d/valheim.sh: No such file or directory
Jan 02 18:13:25 valheim systemd[64181]: valheim.service: Failed at step EXEC spawning /etc/init.d/valheim.sh: No such file or directory

Thank you!

Stanley-Yao commented 1 year ago

Solution: It turns out for some reason the script has a ^M when you cat the script (you can not see it in VIM) https://serverfault.com/questions/592702/no-such-file-or-directory-error-when-trying-to-execute-startup-script-in-debian

Stanley-Yao commented 1 year ago

Or https://stackoverflow.com/questions/14219092/bash-script-bin-bashm-bad-interpreter-no-such-file-or-directory