You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
if you execute the start.sh script with a non-root user the /sbin/route command won't be found and so the startup procedure won't continue.
This is because /sbin is not in the path of non root users.
You should consider using an alternative method to check for an internet connection or adding /sbin to the path if it's not already present.
The text was updated successfully, but these errors were encountered:
Thanks for reminding me of this. Someone let me know on my web site that this was indeed still a thing a few weeks ago here. I believe this issue is specific to Debian (at least I haven't heard of it happening on any other ones). I used to have the path hard coded to get around the Debian issue but what ended up happening is that some other flavors didn't have the route binary on the /sbin path so the "fix" was causing it to break on other platforms.
Because I've been on both sides of this problem at different times I coded a solution for both like this:
if [ -e '/sbin/route' ]; then
DefaultRoute=$(/sbin/route -n | awk '$4 == "UG" {print $2}')
else
DefaultRoute=$(route -n | awk '$4 == "UG" {print $2}')
fi
It's a little bit more hacky than I usually like to do but this issue has a bit of history on here and this should take care of both scenarios. Supporting a wide range of flavors can often lead to a few inconsistencies like this and it's a wonder there aren't a lot more of them in the script. Thank you!
Yeah I believe this is an issue with just Debian as I haven't seen it happen on any other distro.
I manually solved my issue by adding /sbin to the path of the user that launches the server and by launching again the setup script, that added /sbin to the path and it started working again.
Making a script that works on multiple platforms must be a nightmare, thank you for the quick response and the quick fix.
Hello,
if you execute the start.sh script with a non-root user the /sbin/route command won't be found and so the startup procedure won't continue.
This is because /sbin is not in the path of non root users.
You should consider using an alternative method to check for an internet connection or adding /sbin to the path if it's not already present.
The text was updated successfully, but these errors were encountered: