Skip to content

Instantly share code, notes, and snippets.

@brettbeeson
Last active December 30, 2020 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettbeeson/45faf0a8248ec805a2f0da7b6bf671f0 to your computer and use it in GitHub Desktop.
Save brettbeeson/45faf0a8248ec805a2f0da7b6bf671f0 to your computer and use it in GitHub Desktop.
Basic raspberry setup
#!/bin/sh
## non-interactive config
sudo raspi-config nonint do_wifi_country au
## software
sudo apt update && sudo apt dist-upgrade -y
sudo apt install vim git -y
sudo apt install -y autossh
## camera
sudo raspi-config nonint do_camera 0
## autossh
wget -O autossh.service https://gist.github.com/brettbeeson/43f50e164f30e83b367c90a1942b1e6a/raw/854b99e9b59371a87a77c97b59b74feffd068f8d/autossh.service
echo "Edit with your details:"
vi autossh.service
sudo cp autossh.service /etc/systemd/system
sudo systemctl enable autossh.service
## persistant logging
echo Consider persistant logging:
echo sudo mkdir -p /var/log/journal
echo sudo systemd-tmpfiles --create --prefix /var/log/journal
# test after a reboot with "journalctl -b -1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment