kWallet: Bug stop service, umount checks

This commit is contained in:
Daniel Pätzold
2026-03-29 14:12:51 +02:00
parent ffc0b63460
commit df0a792c74
3 changed files with 16 additions and 4 deletions
+15 -3
View File
@@ -36,13 +36,16 @@ WALLETPATH="${DECRYPTEDDATADIR}/kwallet"
WALLETPATH_CFG="$SUDO_HOME/.local/share/kwalletd"
# Stop the daemon anyway if running
WALLET_PID=$( pgrep -u $USER kwalletd6 )
WALLET_PID=$( pgrep -u $SUDO_USER kwalletd6 )
if [[ ! -z ${WALLET_PID} ]]; then
kill ${WALLET_PID} && sleep 0.5
kill ${WALLET_PID} && sleep 0.5 && echo "Service kwalletd6 was stopped."
if [[ $? -ne 0 ]]; then
echo "Kwallet Service could not be stopped, please check why."
exit 1
fi
else
echo "Service kwalletd6 not found to be stopped. Please check why."
exit 1
fi
#Setup encrypted path if not existing already
@@ -56,12 +59,21 @@ if [ ! -f "${WALLETPATH}/${WALLETNAME}.kwl" ]; then
echo "Error: Copy of files for Wallet ${WALLETNAME} failed."
exit 1
fi
else
echo "Will use existing encrypted Wallet in ${WALLETPATH}/${WALLETNAME}.kwl"
fi
chown $SUDO_USER:$SUDO_USER ${WALLETPATH} -R
chmod u=rwX,og-rwx ${WALLETPATH} -R
#Unmount to have free vision to Directory
umount ${WALLETPATH_CFG} >/dev/null 2>&1
if grep -q ""${WALLETPATH_CFG}"" "/etc/mtab"; then
echo "Umount of Wallet-Config ${WALLETPATH_CFG}"
umount ${WALLETPATH_CFG}
if [[ $? -ne 0 ]]; then
echo "Error in unmount. Please check."
exit 1
fi
fi
#With every new start of KDE the Files will be recreated in ${WALLETPATH_CFG} containing no passwords but enrcypted with current user Password.
#We cannot use this wallet, so drop it
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
)¦ň˙8®÷báćSˇăĎđ[Ú‘±†ćúOÍI.´éöV~ĚPŤ|^Ű8ÜYOÇ4źÄ˝–
<p §ˆ3°®™׀ָֽ)u¡3Gםװ‎ֵ„}6:† ‚ִ00¾—+ש´6 ‡K‡8,%qפnו÷