This repository has been archived on 2024-02-04. You can view files and clone it, but cannot push or open issues or pull requests.
flox-dockerized/rootfs/etc/cont-init.d/50-init

21 lines
488 B
Text
Raw Normal View History

2022-04-16 01:25:32 +02:00
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# source env variables
source /etc/cont-init.d/20-setenv
# check if lock file is present
if [[ ! -f /flox/.lock ]]; then
# move app to permanent path
2022-04-16 14:37:16 +02:00
printf 'Copying files to bind mount path\n'
2022-04-16 01:25:32 +02:00
rsync --archive --delete --backup --backup-dir=/tmp /app/flox/ /flox
# create lock file to prevent overwriting existing files
touch /flox/.lock
chmod 600 /flox/.lock
else
printf 'Lock file present. Not copying files\n'
fi