fp/scripts/drupal-init-wrapper.sh

9 lines
335 B
Bash
Raw Normal View History

2024-11-05 19:48:21 +00:00
#!/bin/bash
namespace=futureporn
pod_name=$(kubectl --namespace futureporn get pods -l app.kubernetes.io/name=drupal -o custom-columns=":metadata.name" --no-headers)
kubectl -n "${namespace}" cp ./scripts/drupal-init.sh "${pod_name}:/tmp/drupal-init.sh"
kubectl -n "${namespace}" exec "${pod_name}" -- bash -c "/tmp/drupal-init.sh"