grep full /home/

This commit is contained in:
Krakinou 2021-06-14 23:37:30 +02:00
parent 9c23f43905
commit 29db3d51ff
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ ynh_multimedia_build_main_dir() {
# Création du lien symbolique dans le home de l'utilisateur.
#link will only be created if the home directory of the user exists and if it's located in '/home' folder
home="$(getent passwd $user | cut -d: -f6)"
if [[ -d "$home" && "$(echo "$home" | grep home)" ]]; then
if [[ -d "$home" && "$(echo "$home" | grep /home/)" ]]; then
ln -sfn "$MEDIA_DIRECTORY/$user" "$home/Multimedia"
fi
# Propriétaires des dossiers utilisateurs.

View file

@ -17,7 +17,7 @@ ln -sfn "$MEDIA_DIRECTORY/share" "$MEDIA_DIRECTORY/$user/Share"
# Création du lien symbolique dans le home de l'utilisateur.
#link will only be created if the home directory of the user exists and if it's located in '/home' folder
home="$(getent passwd $user | cut -d: -f6)"
if [[ -d "$home" && "$(echo "$home" | grep home)" ]]; then
if [[ -d "$home" && "$(echo "$home" | grep /home/)" ]]; then
ln -sfn "$MEDIA_DIRECTORY/$user" "$home/Multimedia"
fi
# Propriétaires des dossiers utilisateurs.