Creates systemd service for APIs
[src/app-framework-main.git] / conf / unit / generate-unit-conf / afm-unit
index e2fb7d0..40a56fc 100644 (file)
@@ -50,7 +50,9 @@ define( `IF_NOT_VALUE', `MUSTACH_IF_NOT(value=$1)')
 define( `TARGET', `{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}')
 define( `UNIT_NAME_BASE', `afm-ON_PERM(`:public:hidden', `service', `appli')-{{:id}}--{{:ver}}--{{:#target}}@')
 define( `UNIT_NAME_SERVICE', `UNIT_NAME_BASE%i.service')
-define( `UNIT_NAME_SOCKET_FOR', `afm-api-ws-$1@%i.socket')
+define( `UNIT_NAME_API_BASE', `afm-api-$1')
+define( `UNIT_NAME_API_SERVICE', `UNIT_NAME_API_BASE($1)@$2.service')
+define( `UNIT_NAME_API_SOCKET', `UNIT_NAME_API_BASE($1)@$2.socket')
 define( `APP_DATA_DIR', `/home/%i/app-data')
 define( `USER_RUN_DIR', `@afm_users_rundir@/%i')
 define( `DEBUGGING_DIR', `@afm_platform_rundir@/debug')