In NixOS the notify_push service is using ExecStartPost for calling notify_push:setup once the server is started, which I think is a valid way to handle calling the command.
Currently this setup sometimes fails when a Unix socket is used (see NixOS/nixpkgs#312633) since SystemD considers the service started as soon as it is executed which allows notify_push:setup to run before the socket is created, leading to a failure.
If notify_push would communicate to SystemD when it is operational (for example by using sd-notify) then Type=notify could be used which would delay dependent actions until the socket is created.
If the addition of such a feature is acceptable then I could work on a PR.
In NixOS the notify_push service is using
ExecStartPost
for callingnotify_push:setup
once the server is started, which I think is a valid way to handle calling the command.Currently this setup sometimes fails when a Unix socket is used (see NixOS/nixpkgs#312633) since SystemD considers the service started as soon as it is executed which allows
notify_push:setup
to run before the socket is created, leading to a failure.If notify_push would communicate to SystemD when it is operational (for example by using sd-notify) then
Type=notify
could be used which would delay dependent actions until the socket is created.If the addition of such a feature is acceptable then I could work on a PR.