Add roles/install_ngs-pulsar/templates/pulsar.openrc.j2
This commit is contained in:
26
roles/install_ngs-pulsar/templates/pulsar.openrc.j2
Normal file
26
roles/install_ngs-pulsar/templates/pulsar.openrc.j2
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name="ngs-pulsar"
|
||||
description="Enginsight Pulsar Service"
|
||||
|
||||
command="{{ pulsar_install_path }}/{{ pulsar_binary_name }}"
|
||||
command_args=">> /var/log/enginsight/pulsar.log 2>&1"
|
||||
command_background="yes"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
command_user="root:root"
|
||||
directory="{{ pulsar_install_path }}"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use logger
|
||||
after firewall
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory --owner root:root --mode 0755 /var/log/enginsight
|
||||
checkpath --file --owner root:root --mode 0644 /var/log/enginsight/pulsar.log
|
||||
[ -x "{{ pulsar_install_path }}/{{ pulsar_binary_name }}" ] || {
|
||||
eerror "Binary not executable: {{ pulsar_install_path }}/{{ pulsar_binary_name }}"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user