Files
pms/root/etc/services.d/gocryptfs/run
2018-11-26 10:56:57 +01:00

20 lines
467 B
Plaintext

#!/usr/bin/with-contenv bash
while [ ! -f "/mnt/G-Cache/Video/gocryptfs.conf" ]
do
echo "Waiting for gocryptfs.conf to appear..."
sleep 1
done
mkdir -pv /mnt/Video /crypt/output /crypt/input /Video
gocryptfs -passfile /root/enc-pwd /mnt/G-Cache/Video/ /mnt/Video
cp /mnt/G-Cache/Video/gocryptfs.conf /crypt/output
gocryptfs -passfile /root/enc-pwd /crypt/output /crypt/input
unionfs -o cow /crypt/input=RW:/mnt/Video=RO /Video
until false
do
true
sleep 1
done