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"]
args:
- |
if [ -z "$(ls -A /data)" ]; then
echo "/data is empty, initializing..."
cp -r /app/. /data/
if [ -z "$(ls -A /new_data)" ]; then
echo "/new_data is empty, initializing..."
cp -r /data/. /new_data/
else
echo "/data already initialized, skipping copy."
echo "/new_data already initialized, skipping copy."
fi
volumeMounts:
- name: linkwarden-data
mountPath: /data
mountPath: /new_data
containers:
- name: linkwarden
image: ghcr.io/linkwarden/linkwarden:latest