#!/usr/bin/with-contenv bash while [ ! -f "/encrypted/Video/gocryptfs.conf" ] do echo "Waiting for gocryptfs.conf to appear..." sleep 1 done mkdir -pv /Video chmod 777 /Video s6-setuidgid plex gocryptfs -passfile /config/enc-pwd /encrypted/Video/ /Video until false do true sleep 1 done