Re: Rewriting a shell script

From: Scott Mebberson <scott_at_scottmebberson.com>
Date: Mon, 30 Nov 2015 19:39:02 +1030

Thanks guys! That really helped a lot. I tried define and couldn't get it
to work, so I settled with awk, but I'll take a look at and try out cut
instead.

I like the simple `with-contenv` to import the environment. Nice and clean.

Thanks again!

cheers,
Scott.

On Mon, Nov 30, 2015 at 6:47 PM, Laurent Bercot <ska-skaware_at_skarnet.org>
wrote:

>
> And of course, one second after hitting "Send", I find a
> mistake. Poster's curse.
>
>
> #!/usr/bin/execlineb -P
> with-contenv
> backtick -n BIND
> {
> pipeline { import -u HOSTNAME getent hosts ${HOSTNAME} }
> cut -f1 -d" "
> }
> s6-setuidgid consul
> import -u BIND # forgot this one (backtick doesn't substitute anymore)
>
> consul agent
> -config-dir /etc/consul.d/bootstrap
> -bind ${BIND}
> -----
>
> --
> Laurent
>
Received on Mon Nov 30 2015 - 09:09:02 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC