Server title cutting off after space on linux

Title pretty much, not a big deal but if anyone knows how to fix this or what im doing wrong help wanted

heres my shell script file for running the server, its written inside linux (not ported from windows via ftp or anything) so all the linebreaks and spaces should be ok i think



#!/bin/bash
#gmod server script

~/Steam/gmod/srcds_run -game garrysmod -sv_lan 0 +map gm_flatgrass +gamemode asd +maxplayers 64 +sv_kickerrornum 0 +sv_cheats 1 +sv_allowcslua 1 +hostname "foo bar" -insecure
reset


and heres how it looks in-game

try escaping the space and no double quotes e.g.



#!/bin/bash
#gmod server script

~/Steam/gmod/srcds_run -game garrysmod -sv_lan 0 +map gm_flatgrass +gamemode asd +maxplayers 64 +sv_kickerrornum 0 +sv_cheats 1 +sv_allowcslua 1 +hostname foo\ bar -insecure
reset


no luck there, i tried with +hostname foo\ bar and +hostname “foo\ bar”, first one had the same name in-game as without \ and second one “foo” as name

[editline]5th September 2017[/editline]

guess it doesnt make this solved but if anyones intrested i removed the hostname from the shell script and added it in server.cfg and it works now

odd, never had any issues with this on my debian server.

eh only workaround for you is to set the hostname in cfg or autorun lua script. No idea why that happens