From e96930d16ef3afcdfc3f011a27ab2b20929830bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=C3=A4tzold?= Date: Tue, 31 Mar 2026 20:00:33 +0200 Subject: [PATCH] wallet: reorder services to stop to make it work even when wallet is not startet after logon --- client_software/0010_kwallet/install.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/client_software/0010_kwallet/install.sh b/client_software/0010_kwallet/install.sh index f9eecec..f0f692f 100755 --- a/client_software/0010_kwallet/install.sh +++ b/client_software/0010_kwallet/install.sh @@ -37,6 +37,7 @@ WALLETPATH="${DECRYPTEDDATADIR}/kwallet" WALLETPATH_CFG="$SUDO_HOME/.local/share/kwalletd" # Stop the daemon anyway if running +# kwallet and kwalletmanager are optional and only started when an app has been using them already WALLET_PID=$( pgrep -u $SUDO_USER kwalletd6 ) if [[ ! -z ${WALLET_PID} ]]; then MANAGER_PID=$( pgrep -u $SUDO_USER kwalletmanager5 ) @@ -48,23 +49,21 @@ if [[ ! -z ${WALLET_PID} ]]; then exit 1 fi fi - SECTRETS_PID=$( pgrep -u $SUDO_USER ksecretd ) - if [[ ! -z ${SECTRETS_PID} ]]; then - echo "Stopping ksecretd with PID ${SECTRETS_PID}" - kill ${SECTRETS_PID} - if [[ $? -ne 0 ]]; then - echo "Service could not be stopped, please check why." - exit 1 - fi - fi - kill ${WALLET_PID} && sleep 0.5 && echo "Service kwalletd6 (${WALLET_PID}) was stopped too." + kill ${WALLET_PID} && sleep 0.5 && echo "Service kwalletd6 (${WALLET_PID}) 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 +# ksecret is the basic daemon now, it needs to be stopped last +SECTRETS_PID=$( pgrep -u $SUDO_USER ksecretd ) +if [[ ! -z ${SECTRETS_PID} ]]; then + echo "Stopping ksecretd with PID ${SECTRETS_PID}" + kill ${SECTRETS_PID} && sleep 0.5 + if [[ $? -ne 0 ]]; then + echo "Service could not be stopped, please check why." + exit 1 + fi fi #Setup encrypted path if not existing already