More logical way of doing things

This commit is contained in:
j 2025-07-12 13:38:14 +10:00
parent 5626e4fbb9
commit 6b62cebfcf

View file

@ -61,15 +61,15 @@ spec:
command: ["/bin/sh", "-c"] command: ["/bin/sh", "-c"]
args: args:
- | - |
if [ -z "$(ls -A /data)" ]; then if [ -z "$(ls -A /new_data)" ]; then
echo "/data is empty, initializing..." echo "/new_data is empty, initializing..."
cp -r /app/. /data/ cp -r /data/. /new_data/
else else
echo "/data already initialized, skipping copy." echo "/new_data already initialized, skipping copy."
fi fi
volumeMounts: volumeMounts:
- name: linkwarden-data - name: linkwarden-data
mountPath: /data mountPath: /new_data
containers: containers:
- name: linkwarden - name: linkwarden
image: ghcr.io/linkwarden/linkwarden:latest image: ghcr.io/linkwarden/linkwarden:latest