nextcloud / notify_push

Update notifications for nextcloud clients
GNU Affero General Public License v3.0
224 stars 40 forks source link

Support SystemD `Type=notify` #452

Closed Deric-W closed 3 months ago

Deric-W commented 3 months ago

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.