diff --git a/roles/install_ngs-pulsar/templates/pulsar.service.j2 b/roles/install_ngs-pulsar/templates/pulsar.service.j2 new file mode 100644 index 0000000..d839adb --- /dev/null +++ b/roles/install_ngs-pulsar/templates/pulsar.service.j2 @@ -0,0 +1,25 @@ +# roles/install_ngs-pulsar/templates/pulsar.service.j2 +[Unit] +Description=NGS-Pulsar +ConditionPathExists={{ pulsar_install_path }}/ +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=root +WorkingDirectory={{ pulsar_install_path }}/ +ExecStartPre=/bin/mkdir -p /var/log/enginsight +ExecStart={{ pulsar_install_path }}/{{ pulsar_binary_name }} +ExecStopPost={{ pulsar_install_path }}/{{ pulsar_binary_name }} -clear-shield +KillMode=process +Restart=on-failure +RestartSec=3 +StartLimitInterval=600 +StartLimitBurst=5 +StandardOutput=journal +StandardError=journal +SyslogIdentifier=pulsar-m8 + +[Install] +WantedBy=multi-user.target \ No newline at end of file