forked from obel1x/fedora-OEMDRV
KWallet: No Migration, use predefined wallets
This commit is contained in:
@@ -48,8 +48,14 @@ fi
|
|||||||
#Setup encrypted path if not existing already
|
#Setup encrypted path if not existing already
|
||||||
mkdir -p ${WALLETPATH}
|
mkdir -p ${WALLETPATH}
|
||||||
#Check, if wallet ist already setup in encryted dir. If not, copy our empty deafult wallets to it
|
#Check, if wallet ist already setup in encryted dir. If not, copy our empty deafult wallets to it
|
||||||
if [ -f "${WALLETPATH}/${WALLETNAME}.kwl" ]; then
|
if [ ! -f "${WALLETPATH}/${WALLETNAME}.kwl" ]; then
|
||||||
cp ${WALLETNAME}*.* ${WALLETPATH}
|
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
|
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
|
||||||
@@ -74,16 +80,6 @@ if [[ $? -ne 0 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
#Restart the service
|
||||||
su -c 'nohup kwalletd6 >/dev/null 2>&1 &' $SUDO_USER
|
su -c 'nohup kwalletd6 >/dev/null 2>&1 &' $SUDO_USER
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
Reference in New Issue
Block a user