Skip to content

Instantly share code, notes, and snippets.

@jrjsmrtn
jrjsmrtn / avahi-publish-postgresql@.service
Last active March 10, 2024 14:33
Publish PostgreSQL Cluster service using avahi-publish
[Unit]
Description=Avahi Service Publisher for PostgreSQL Cluster %i
AssertPathExists=/etc/postgresql/%I/postgresql.conf
AssertFileIsExecutable=/usr/bin/avahi-publish-service
Wants=postgresql@%i.service
After=postgresql@%i.service
BindsTo=postgresql@%i.service
[Service]
Environment="N=%i"