Skip to content

Instantly share code, notes, and snippets.

@metalefty
metalefty / xrdp_clean_sockets.sh
Last active April 8, 2019 03:29
Clean up remained xrdp socket files
#!/bin/sh
SOCKDIR=/tmp/.xrdp
SESSIONS=$(cd ${SOCKDIR} ; ls -1 xrdp_* | sed -e 's|[^0-9]||g' | sort -u)
for i in ${SESSIONS}
do
if [ ! -S ${SOCKDIR}/xrdp_display_${i} ]
then
(