diff --git a/files/session-cleanup.sh b/files/session-cleanup.sh new file mode 100644 index 0000000..adc7742 --- /dev/null +++ b/files/session-cleanup.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Session cleanup for user student on logout + +if [ "${USERNAME}" = "student" ]; then + rm -rf /home/student/.cache/mozilla + rm -rf /home/student/.mozilla +fi + +exit 0 diff --git a/setup.yaml b/setup.yaml index 88fb43f..9754d3a 100644 --- a/setup.yaml +++ b/setup.yaml @@ -88,6 +88,12 @@ line: "DenyUsers student" create: true + - name: Copy session cleanup script + copy: + src: 'files/session-cleanup.sh' + dest: '/etc/gdm/PostSession/Default' + mode: '0755' + - name: Software hosts: all