From 1afc7df5b06b1f0d47dd24eefad599e4f5431e92 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 5 Sep 2022 21:12:52 +0200 Subject: [PATCH 1/2] Change user app home too if homedir is moved --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 476ef6a..40df97c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -110,6 +110,7 @@ fi # Move data directory if [ -e "/home/""$app" ] && [ ! -e $datadir ]; then mv "/home/""$app" "$datadir" + usermod -d "$datadir" $app fi #================================================= From 3e05859e500262830fbccc069a205ae6437b34c8 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 5 Sep 2022 22:43:19 +0200 Subject: [PATCH 2/2] Better change user app home --- scripts/upgrade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 40df97c..e6ffa01 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -110,6 +110,10 @@ fi # Move data directory if [ -e "/home/""$app" ] && [ ! -e $datadir ]; then mv "/home/""$app" "$datadir" +fi + +# Ensuring the user has the right home dir +if [ ~$app != "$datadir" ]; then usermod -d "$datadir" $app fi