summaryrefslogtreecommitdiff
path: root/roles/apps/nextcloud/templates/run-cron.sh.j2
blob: 9936bad179b1cae9059c6e07ac6daabd72440e6e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

{% if kubernetes_cri_socket is defined %}
export CONTAINER_RUNTIME_ENDPOINT="{{ kubernetes_cri_socket }}"
{% endif %}

POD_NAME="{{ item }}-$(hostname)"
POD_ID=$(crictl pods --name "$POD_NAME" --state ready -q)
CONTAINER_ID=$(crictl ps --pod "$POD_ID" --name nextcloud -q)

exec crictl exec "$CONTAINER_ID" php -f /var/www/html/cron.php