Skip to content

Commit 8298835

Browse files
committed
prevent codam-web-greeter-cleanup from running for non-student users
1 parent 1591853 commit 8298835

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

systemd/user/codam-web-greeter-cleanup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
# Exit on error
44
set -e
55

6+
# Only run for users in the student or piscine group
7+
if ! /usr/bin/groups | /usr/bin/grep -qE '(student|piscine)'; then
8+
/usr/bin/echo "Not running for user $(/usr/bin/whoami)"
9+
exit 0
10+
fi
11+
612
TMP_WALLPAPER_PATH="/tmp/codam-web-greeter-user-wallpaper"
713
TMP_AVATAR_PATH="/tmp/codam-web-greeter-user-avatar"
814

0 commit comments

Comments
 (0)