mdlayher / consrv

Command consrv is a SSH to serial console bridge server, originally designed for deployment on gokrazy.org devices. Apache 2.0 Licensed.
Other
136 stars 4 forks source link

unify config file loading, try /etc #6

Closed stapelberg closed 2 years ago

stapelberg commented 2 years ago

On modern gokrazy installations, consrv starts out in PWD=/perm/consrv by default, so the -c consrv.toml flag from main_others.go actually works on gokrazy, too, so we don’t need main_gokrazy.go at all. Even better: this way, the flag can be used on gokrazy, too (why not?).

Also, instead of looking for the configuration / host key in one place and then giving up, try a number of paths in order: the flag value, /etc/consrv (so that you can maintain the consrv configuration in extrafiles/), /perm/consrv and consrv.toml (flag default value).