Hi,

right now `wg-quick@.service` uses the lines

    ExecStart=/usr/bin/wg-quick up %i
    ExecStop=/usr/bin/wg-quick down %i
ExecReload=/bin/bash -c 'exec /usr/bin/wg syncconf %i <(exec /usr/bin/wg-quick strip %i)'

to interact with `wq-quick`.

The use of `%i` only allows the use of INTERFACE names, e.g.

    systemctl up wg-quick@wg0

but prevents users of passing CONFIG_FILE paths, e.g.

    systemctl up wg-qu...@-home-me-configs-wg0.conf

because `-home-me-configs-wg0.conf` does not get unescaped to `/home/me/configs/wg0.conf`.

By replacing the first two lines with

    ExecStart=/usr/bin/wg-quick up %I
    ExecStop=/usr/bin/wg-quick down %I

would allow such usage.

The third line however is a bit tricky, as the argument to `wg syncconf` is expected to be an INTERFACE name, and the argument to `wg-quick strip` can also be a CONFIG_FILE path.

I am not sure how to solve the `ExecReload` argument issue, but I think having the option to also pass in CONFIG_FILE paths to the unit would be quite helpful.

Best
--
Nils Werner

Reply via email to