mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
grep full /home/
This commit is contained in:
parent
9c23f43905
commit
29db3d51ff
2 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ ynh_multimedia_build_main_dir() {
|
||||||
# Création du lien symbolique dans le home de l'utilisateur.
|
# 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
|
#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)"
|
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"
|
ln -sfn "$MEDIA_DIRECTORY/$user" "$home/Multimedia"
|
||||||
fi
|
fi
|
||||||
# Propriétaires des dossiers utilisateurs.
|
# Propriétaires des dossiers utilisateurs.
|
||||||
|
|
|
@ -17,7 +17,7 @@ ln -sfn "$MEDIA_DIRECTORY/share" "$MEDIA_DIRECTORY/$user/Share"
|
||||||
# Création du lien symbolique dans le home de l'utilisateur.
|
# 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
|
#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)"
|
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"
|
ln -sfn "$MEDIA_DIRECTORY/$user" "$home/Multimedia"
|
||||||
fi
|
fi
|
||||||
# Propriétaires des dossiers utilisateurs.
|
# Propriétaires des dossiers utilisateurs.
|
||||||
|
|
Loading…
Add table
Reference in a new issue