cd /home/pi/
wget https://raw.githubusercontent.com/craigmayhew/USBCleanser/master/dataObliterator.py
cd /etc/usbmount/mount.d/
wget https://raw.githubusercontent.com/craigmayhew/USBCleanser/master/01_wipe_data
chmod 755 /etc/usbmount/mount.d/01_wipe_data
Restart the RPi and away you go.
Full source code available here: https://github.com/craigmayhew/USBCleanser
© 2005-2024 Craig Mayhew