From 3e05859e500262830fbccc069a205ae6437b34c8 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 5 Sep 2022 22:43:19 +0200 Subject: [PATCH] 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