KWallet: No Migration, use predefined wallets

This commit is contained in:
Daniel Pätzold
2026-03-29 13:42:35 +02:00
parent 3d05715415
commit ffc0b63460
+8 -12
View File
@@ -48,8 +48,14 @@ fi
#Setup encrypted path if not existing already
mkdir -p ${WALLETPATH}
#Check, if wallet ist already setup in encryted dir. If not, copy our empty deafult wallets to it
if [ -f "${WALLETPATH}/${WALLETNAME}.kwl" ]; then
cp ${WALLETNAME}*.* ${WALLETPATH}
if [ ! -f "${WALLETPATH}/${WALLETNAME}.kwl" ]; then
echo "Wallet ${WALLETNAME} was not found, setting it up from scratch."
rm -f ${WALLETPATH}/*
cp ${WALLETNAME}.* ${WALLETPATH}
if [[ $? -ne 0 ]]; then
echo "Error: Copy of files for Wallet ${WALLETNAME} failed."
exit 1
fi
fi
chown $SUDO_USER:$SUDO_USER ${WALLETPATH} -R
chmod u=rwX,og-rwx ${WALLETPATH} -R
@@ -74,16 +80,6 @@ if [[ $? -ne 0 ]]; then
exit 1
fi
PATTERN=(${WALLETPATH_CFG}/${WALLETNAME}.kwl)
if [ ! -f ${PATTERN[0]} ]; then
echo "Wallet ${WALLETNAME} was not found, setting it up from scratch."
cp kdewallet.* ${WALLETPATH}
if [[ $? -ne 0 ]]; then
echo "Error: Copy of files for Wallet ${WALLETNAME} failed."
exit 1
fi
fi
#Restart the service
su -c 'nohup kwalletd6 >/dev/null 2>&1 &' $SUDO_USER
sleep 1