gocryptfs: clean session mount/unmount via systemd service #29

Merged
obel1x merged 7 commits from unbrot/fedora-OEMDRV:main into main 2026-05-07 18:07:11 +02:00
Showing only changes of commit 815fa46daa - Show all commits
+8 -1
View File
@@ -99,7 +99,14 @@ systemd-run --user --unit=gocryptfs-home \
--property=TimeoutStopSec=30 \
gocryptfs -noprealloc -allow_other -passfile ${XDG_RUNTIME_DIR}/IPAVAULTKEY -config ${HOME}/.config/gocryptfs/gocryptfs.conf ${ENCRYPTEDDATADIR} ${DECRYPTEDDATADIR} >/dev/null
RETVAL=$?
rm ${XDG_RUNTIME_DIR}/IPAVAULTKEY
# Service starts asynchronously - wait for the FUSE mount to appear before removing
# the passfile, otherwise gocryptfs may not have read it yet
_t=0
while [ "${_t}" -lt 10 ] && ! grep -q "${DECRYPTEDDATADIR}" /proc/mounts 2>/dev/null; do
sleep 1
_t=$((_t + 1))
done
rm -f ${XDG_RUNTIME_DIR}/IPAVAULTKEY
cd ${EXECDIR}
if [ ${RETVAL} -eq 0 ]; then
echo "Sucessfully mounted encrypted private Directory ${DECRYPTEDDATADIR}"