shell-host/session/lightdm/lightdm.conf.d/lightdm-cleanup.sh

9 lines
285 B
Bash
Executable File

#!/bin/bash
dir=${HOME}/${USER_SESSION_DIR:-.session}
file=${dir}/session_logout
echo "running as user $(id -u), cleanup for ${USER}, file:${file} $(date)" >> /opt/scripts/lightdm.log
log=${dir}/session.log
if [[ -e "$file" ]]; then
/bin/bash $file 1>>${log} 2>>${log} || true
fi