I created systemd service, which runs a script that auto-generates some configuration files if these don't exist, and loads the services depending on them, or loads the services with the existing ones.
I would like to provide some extra functionality, allowing the user to clean previous configurations using the same systemctl service.
I thought in ExecReload
, thinking that it would be called when the user types systemctl restart service_name
, but then I discovered that it is not doing what I thought.
Is there a way to do it, please? I was checking here and in Freedesktop Systemd doc, but I could not find the way