yeah more formatting

dunno why lower headers are larger
This commit is contained in:
Christian
2021-03-27 12:01:48 -04:00
parent 820817c957
commit 1ea0b6abe9

View File

@@ -10,7 +10,7 @@ lost. So I used my Raspberry Pi to easily back it up. All I have to do is plug
the card into the Pi, and it copies the files into a new folder and toggles a
light when its done.
# What I used:
## What I used:
* SD Card adapter
* USB mouse that I didn't care about
(any usb device that can light up will work)
@@ -19,12 +19,12 @@ light when its done.
I did this on Ubuntu, but the instructions should work for Raspbian as well.
# Files
## Files
I made a few files for this to work: a udev rule file, a systemd unit, and a
shell script.
## Udev Rule
# Udev Rule
```
# /etc/udev/rules.d/999-automount.rules
ACTION=="add", SUBSYSTEM=="block", ENV{ID_SERIAL_SHORT}=="000000000828", RUN+="/usr/bin/systemctl start DSi.service"
@@ -33,7 +33,7 @@ You'll have to modify the `000000000828` to match the serial of your device,
which you can get by plugging in the device, finding its /dev file, and running
`udevadm info /dev/sdx | grep ID_SERIAL_SHORT`.
## Systemd Service
# Systemd Service
```
# /etc/systemd/system/DSi.service
[Unit]
@@ -47,7 +47,7 @@ with `systemctl enable`, just executed with `systemctl start`, which the udev
rule will do automatically. You'll want to modify the `ExecStart` line to point
to your shell script.
## Shell Script
# Shell Script
```
#!/bin/sh
# /home/ubuntu/autocopy.sh
@@ -84,7 +84,7 @@ The `USBDEV` variable is the path to your USB "light" inside
then `cat` the `idProduct` and `idVendor` files inside each usb device folder
until you find the one that matches your usb device.
# Final Product
## Final Product
What you'll have is something you can plug your SD card into and have a backup
taken automagically. The light turns on when it's copying files, and turns off