J_Me
December 18th, 2015, 05:25 PM
I need to delete a plain text file(via a script) when the computer resumes from hibernate/suspend but I'm not sure where to put the script. Reading around the web it's been suggested to use one of these folders1 /lib/systemd/system-sleep/my-script1 /usr/lib/pm-utils/sleep.d/my-script1 1 But I don't want to mess things up so thought it best to ask here.1 1 The intended script to use1 --------------------------1 #!/bin/bash1 sleep 301 rm /tmp/my-temp-file1 ----------------------------1 1 Also it's been mentioned to name the script something like 999zzzMYfile.sh so that it executes last, rather than doing this and potentially messing with the operating system can't I just put in a 'sleep 30' and have the script wait until things have settled.1 1 Thanks