Signed-off-by: John Mulligan <jmulligan@redhat.com>
--- /dev/null
+#!/bin/sh
+# {{ comment }}
+
+set -e
+if [ "$1" = stop ] || [ "$1" = poststop ]; then
+ ! {{ sidecar.stop_cmd() | map('shellquote') | join(' ') }}
+ ! {{ ctx.container_engine.path }} inspect {{ sidecar.cname | shellquote }} &>/dev/null
+ exit $?
+fi
+
+! {{ sidecar.rm_cmd() | map('shellquote') | join(' ') }} 2> /dev/null
+{%- if has_podman_engine %}
+! {{ sidecar.rm_cmd(storage=True) | map('shellquote') | join(' ') }} 2> /dev/null
+{%- endif %}
+
+exec {{ sidecar.run_cmd() | map('shellquote') | join(' ') }}
+
sidecar_service = 'sidecar.service.j2'
cluster_logrotate_config = 'cluster.logrotate.config.j2'
cephadm_logrotate_config = 'cephadm.logrotate.config.j2'
+ sidecar_run = 'sidecar.run.j2'
def __str__(self) -> str:
return self.value