# generated by cephadm
[Unit]
Description=Ceph Init Containers for %i on {{ identity.fsid }}
After=network-online.target local-fs.target time-sync.target
Wants=network-online.target local-fs.target time-sync.target
{%- if has_docker_engine %}
After=docker.service
Wants=docker.service
{%- endif %}
Before=ceph-{{ identity.fsid }}@%i.service

PartOf=ceph-{{ identity.fsid }}.target
Before=ceph-{{ identity.fsid }}.target

[Service]
LimitNOFILE=1048576
LimitNPROC=1048576
EnvironmentFile=-/etc/environment
ExecStart=/bin/bash {{ ctx.data_dir }}/{{ identity.fsid }}/%i/init_containers.run
ExecStop=/bin/bash {{ ctx.data_dir }}/{{ identity.fsid }}/%i/init_containers.run stop
ExecStopPost=-/bin/bash {{ ctx.data_dir }}/{{ identity.fsid }}/%i/init_containers.run  poststop
# FIXME: Disable Restart on oneshot service. systemd versions before v224
# did not allow Restart=on-failure with a oneshot service. Having it set
# prevents the service from starting on centos8. Disable it for now and
# revisit this at a later time.
#Restart=on-failure
#RestartSec=10s
TimeoutStopSec=120
StartLimitInterval=30min
StartLimitBurst=5
Type=oneshot
RemainAfterExit=yes
{%- if has_podman_split_version %}
Delegate=yes
{%- endif %}

[Install]
WantedBy=ceph-{{ identity.fsid }}.target

