blob: 48660c288e828e2eb471780632c42d7004e6c810 [file] [log] [blame]
Matthias Andreas Benkard04326c92021-08-18 20:14:48 +02001#! /bin/sh
2set -e -o pipefail
3
4pod=$(kubectl get pods -lname=samba -ojsonpath='{.items[].metadata.name}')
5
6kubectl exec -c master -ti "$pod" -- pdbedit --configfile=/var/lib/samba/smb.conf "$@"
7kubectl cp "$pod":/var/lib/samba/private/smbpasswd smbpasswd
8kubectl create secret generic samba-smbpasswd --save-config --dry-run=client --from-file=smbpasswd=smbpasswd -oyaml | kubectl apply -f -