diff --git a/client_software/0010_kwallet/install.sh b/client_software/0010_kwallet/install.sh index a328fcf..2fc3153 100755 --- a/client_software/0010_kwallet/install.sh +++ b/client_software/0010_kwallet/install.sh @@ -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