Supplying configuration file via bash

Michal Kazior michal.kazior at tieto.com
Tue Sep 20 02:23:51 PDT 2016


On 20 September 2016 at 11:07, Etan Kissling <kissling at oberon.ch> wrote:
> Greetings,
>
> I'd like to start hostapd without a stored configuration file from a script.
> Is it possible to do that, e.g. with config as a heredoc, similar to the following snippet?

You can try on bash4:

hostapd <(cat <<EOF
// config goes here
EOF
)

On rc shell:

hostapd <{cat <<EOF
// config goes here
EOF
)

Generally on linux:

hostapd /dev/stdin <<EOF
// config goes here
EOF

/dev/stdin points to /proc/self/fd/0 meaning you can use these paths
interchangeably.


Michał



More information about the Hostap mailing list