← All topics

4 articles in the notebook

Linux.

Automatic unlock QNAP volumes from network

Encrypted QNAP volumes protect against stolen hardware, but someone must enter the key after every power loss. This BASH script in a cron job on another machine logs in, finds locked volumes and unlocks them automatically — security without the 3AM wake-up.

Perl: Command-line regex

A few one-liners I keep reaching for: filtering and replacing with regex straight from the Perl command line, including in-place file editing with automatic backups.