Generate afm-unit.conf using m4
[src/app-framework-main.git] / conf / generate-unit-conf / provided.inc
diff --git a/conf/generate-unit-conf/provided.inc b/conf/generate-unit-conf/provided.inc
new file mode 100644 (file)
index 0000000..d42ba77
--- /dev/null
@@ -0,0 +1,32 @@
+;---------------------------------------------------------------------------------
+;----        P R O V I D E D   A P I S                                        ----
+;---------------------------------------------------------------------------------
+
+{{#provided-api}}
+{{#value=ws|auto}}
+
+%begin systemd-unit
+
+# auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
+
+%systemd-unit system
+%systemd-unit socket afm-api-ws-{{name}}@
+
+[Socket]
+SmackLabel=*
+ListenStream=%t/apis/ws/{{name}}
+FileDescriptorName={{name}}
+
+Service=UNIT_NAME_SERVICE
+
+%nl
+[Install]
+WantedBy=sockets.target
+%systemd-unit wanted-by sockets.target
+
+%end systemd-unit
+
+{{/value=ws|auto}}
+{{/provided-api}}
+
+