I have an upstart job named server.conf to start a game server that contains the following


exec /srv/l4d2/srcds_run -game left4dead2 -tickrate 30 -maxplayers 8 -ip "+map \"c1m1_hotel versus\"" +exec server.cfg

When I run start server.conf, the job doesn't start and the log file says /bin/sh: 1: /bin/sh: Syntax error: Unterminated quoted string

When run directly in the console, the command works just fine. So how to use it in the exec stanza without breaking it?

1 Answer 1


The key is in the program that issued the error message: /bin/sh. The sh shell's quoting rules don't recognize "\"". See man sh. Use single quote "'" instead.

exec /srv/l4d2/srcds_run -game left4dead2 -tickrate 30 -maxplayers 8 -ip "+map 'c1m1_hotel versus'" +exec server.cfg

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.