Describe the bug
Needs additional hardening for missing files, as well as /dev/null redirections.
Example of running on an uninstalled server:
Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory.
Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory.
Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory.
Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory.
Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory.
find: '/home/steam/valheimserver/officialvalheimbuild': No such file or directory
/installer/menu.sh: line 1074: /home/steam/steamcmd: No such file or directory
/installer/menu.sh: line 1075: /home/steam/valheimserver/officialvalheimbuild: No such file or directory
chown: invalid user: 'steam:steam'
To Reproduce
Just run it on an unconfigured system, docker example:
Note: you'll need to manually install git and curl in the container unless you use the changes in my last Pull Request.
docker run -it -v "$(pwd)":/installer/ ubuntu:bionic /installer/menu.sh
Even more alarming is that failing to load the language file yields no errors and the script just keeps going.
Expected behavior
If a file that is not required fails to load the user shouldn't see the error message (redirect to /dev/null).
If a file that is required fails to load (e.g. language file) the script should stop and provide an error message.
Describe the bug Needs additional hardening for missing files, as well as /dev/null redirections.
Example of running on an uninstalled server:
Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory. Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory. Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory. Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory. Can't open /home/steam/valheimserver/start_valheim.sh: No such file or directory. find: '/home/steam/valheimserver/officialvalheimbuild': No such file or directory /installer/menu.sh: line 1074: /home/steam/steamcmd: No such file or directory /installer/menu.sh: line 1075: /home/steam/valheimserver/officialvalheimbuild: No such file or directory chown: invalid user: 'steam:steam'
To Reproduce Just run it on an unconfigured system, docker example:
Note: you'll need to manually install git and curl in the container unless you use the changes in my last Pull Request.
docker run -it -v "$(pwd)":/installer/ ubuntu:bionic /installer/menu.sh
Even more alarming is that failing to load the language file yields no errors and the script just keeps going.
Expected behavior If a file that is not required fails to load the user shouldn't see the error message (redirect to /dev/null). If a file that is required fails to load (e.g. language file) the script should stop and provide an error message.