You need to replace the substring:"server_name<chotatut>;" on"server_name<value from variable>".
I tried this, but the odd one does not work:

sed -i"s/server_name \ s(.+ ?.);/server_name ${SERVER_NAME_CLIENT};/" conf.d/client.conf

The rulebook itself is working how to correctly apply it in sed?
  • And what exactly doesn’t work for you if the regular schedule is working?
    Maybe she is not very working?
    – Gifted Grebe Aug 25 '19 at 02:07

1 Answers 1

I think the problem is that the groups appeared in later regulars.Use the -r
option Or you can simplify your regular routine to
sed -ri"s/server_name[^;] *;/server_name ${SERVER_NAME_CLIENT};/" conf.d/client.conf
  • The group worked without additional flags.It was not obvious that the group brackets needed to be escaped.
    sed -i"s/\(server_name \).* $/\ 1 ${SERVER_NAME_CLIENT };/"input
    – Determined Deer Aug 25 '19 at 02:21