Arve Barsnes wrote: > On Thu, 3 Jul 2025 at 20:48, Dale <rdalek1...@gmail.com> wrote: >> Well, today is my usual go to town day. It was a longer day today tho. >> I had a 6 month checkup with one Doctor and my regular weekly Doctor >> visit with another one. Plus I did my usual shopping for groceries >> etc. When I leave, I close my video player and lock the drives. When I >> return, I get to unlock them again. >> >> I ran the script to see if it would detect the drive is already open and >> mounted or not but today, I got to test the part where it is not open or >> mounted. I ran the script, it asked for my password and unlocked like a >> champ and then mounted my drives. No boo boos or anything. I'm still >> tweaking a bit. >> >> I still may improve some things like Javier mentioned but at least for >> now, it works. It gives me a starting point for other scripts. Then I >> can add the backup section to the scripts that do backups, and then >> unmount them as well when done. :-D >> >> I may start getting lazy. ROFL > Congrats Dale! The satisfaction of a home-made script that does what > you want it to do is fantastic :) > > Regards, > Arve
Now I'm working on a script to unmount and lock a drive or drive set. I got the part that tests to see if a file is open done. I used lsof to do that. The exit code is a little backward for what I'm doing but I got it figured out. Once I get that done, I just copy the script and change the variables for other drives or drive sets. Then for my backup drives, I add the part to update the backups and the variables for that. Then I can copy those and change the variables for all my backup scripts. I think I'm turning into a monster. ROFLMBO Dale :-) :-)