Comment Comment by mcint For automatic cleanup, you can try bash's trap command. Set up a cleanup trap when you create the file.In .ssh/rc: if [ -n "$DOMAIN" ]; then # ... create socket & report to user clean_socket(){ rm /tmp/test.dev.tld.socket; } trap clean_socket EXIT INT HUP; fi parent mcint 2 years ago
In .ssh/rc: