Automatically mount USB-sticks
We implemented a new feature for our PASSDORA Box. Passdora is a Raspberry Pi based system which hosts the Sequry password-manager.
New Features
What feature(s) did you add?
Automatically created backups should be copied to a connected USB-drive.
In order to access the USB-drive and copy the backup-files onto it, it needs to be mounted first.
Since the process should be automated, requiring no user interaction besides plugging in the USB-drive, a background script is required that automatically mounts USB-drives when they're connected.
Reasons
- copy backups to USB-drive -> mounting required
How did you implement it/them?
The following procedure should allow the automatic mount of USB-drives:
- create a udev-rule that detects when a (usb-)drives is plugged in (Build_Image/files/usb_automount/usbstick.rules)
- create a service that get's called by the udev-rule and starts a script to mount the connected drive (Build_Image/files/usb_automount/[email protected])
- create a script that finally mounts the drive (Build_Image/files/usb_automount/automount)
- add a step to the setup (-script) that copies the above files to their correct locations (Build_Image/scripts/system.sh)
Thanks for reading
Jan, for PCSG Developers
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Thank you :-)
Hey @vladimir-simovic, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Hey @pcsg-dev I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x