When we write a config for the frist time a unique id is generated and appended to the filename.
So it is possible to identify a config clearly.
The variable config is rename to hook because this function takes now
the name of the hook and the id. The name of the config is no more suitable.
If no id is passed we generate one.
This should only happen when we write the file for the first time.
Fixes: #11405 Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>