Excellent software and practical tutorials
Edit the startup file under Windows and upload it tolinuxAfter the server was installed, the file was clearly in the directory, but when I started the file, it prompted No such file or directory. I checked the contents of the startup file repeatedly and there was nothing wrong! It turned out that the problem wasCarriage Returnsuperior.
Enter the following command line:
cat /etc/init.d/v2ray
You will notice that there is a ^M symbol after each line, these are carriage return characters.
The Linux system may not be able to read the shell script correctly when it encounters a script edited under Windows. This may happen when a text editor or terminal creates a file under Windows because Windows uses the carriage return character +Line Breaksas a newline character, while Linux systems use only newline characters.
Remove the carriage returns from your init script. This can be done with a one-line sed:
sed -i -e 's/\r//g' /etc/init.d/v2ray
After deleting the carriage return character, you can successfully start the service.