kWallet: Bug stop service, umount checks
This commit is contained in:
@@ -36,13 +36,16 @@ WALLETPATH="${DECRYPTEDDATADIR}/kwallet"
|
|||||||
WALLETPATH_CFG="$SUDO_HOME/.local/share/kwalletd"
|
WALLETPATH_CFG="$SUDO_HOME/.local/share/kwalletd"
|
||||||
|
|
||||||
# Stop the daemon anyway if running
|
# Stop the daemon anyway if running
|
||||||
WALLET_PID=$( pgrep -u $USER kwalletd6 )
|
WALLET_PID=$( pgrep -u $SUDO_USER kwalletd6 )
|
||||||
if [[ ! -z ${WALLET_PID} ]]; then
|
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
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Kwallet Service could not be stopped, please check why."
|
echo "Kwallet Service could not be stopped, please check why."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Service kwalletd6 not found to be stopped. Please check why."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Setup encrypted path if not existing already
|
#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."
|
echo "Error: Copy of files for Wallet ${WALLETNAME} failed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Will use existing encrypted Wallet in ${WALLETPATH}/${WALLETNAME}.kwl"
|
||||||
fi
|
fi
|
||||||
chown $SUDO_USER:$SUDO_USER ${WALLETPATH} -R
|
chown $SUDO_USER:$SUDO_USER ${WALLETPATH} -R
|
||||||
chmod u=rwX,og-rwx ${WALLETPATH} -R
|
chmod u=rwX,og-rwx ${WALLETPATH} -R
|
||||||
|
|
||||||
#Unmount to have free vision to Directory
|
#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.
|
#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
|
#We cannot use this wallet, so drop it
|
||||||
|
|||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
)¦ň˙8®÷báćSˇăĎđ[Ú‘±†ćúOÍI.´éöV~Ě�PŤ|^Ű8ÜYOÇ4źÄ˝–<Ł
|
<�p§ˆ�3°®™׀ָֽ)u¡3Gם�װֵ„}6:† ‚ִ00¾—+ש´6 ‡K‡8,%qפnו÷
|
||||||
Reference in New Issue
Block a user