Implement the custom role concept
- Custom Ansible roles can be stored in the `roles/custom` directory - The list `custom_roles` determines which roles are included
This commit is contained in:
parent
a1149945da
commit
91ab4d3511
24 changed files with 479 additions and 470 deletions
20
roles/custom/fvs/files/lmn-fixhome-dolphin.sh
Normal file
20
roles/custom/fvs/files/lmn-fixhome-dolphin.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
file="${1:-$HOME/.local/share/user-places.xbel}"
|
||||
|
||||
[[ -e "$file" ]] || exit 0
|
||||
|
||||
if id | grep -q teachers; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NETHOME=(/srv/samba/schools/default-school/students/*/"$USER")
|
||||
[[ -d $NETHOME ]] || exit 0
|
||||
|
||||
if FOUND=$(grep -o "/srv/samba/schools/default-school/students/.*/$USER" $file); then
|
||||
if [[ "$NETHOME" != "$FOUND" ]] ; then
|
||||
sed -i "s|/srv/samba/schools/default-school/students/.*/$USER|$NETHOME|g" $file
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue