# configuration file for rpi_setup.sh ################################# Edit these ################################### NewHostname='♣hostanme♣' NewPassword='♣your-wifi-password♣' YourEmail='♣your-email♣' ################################# Edit these ################################### DefaultUser='pi' DefaultPassword='raspberry' # The BaseDirectory is where everything will be installed (/home/pi) BaseDirectory="$PWD" # Help message read -r -d '' Help <<- EOM ${Bold}NAME${Normal} rpi_setup.sh configures a Raspbery Pi the way I like it. ${Bold}SYNOPSIS${Normal} bash [-bashOptions] rpi_setup.sh [-rpi_setupOptions] ${Bold}DESCRIPTION${Normal} rpi_setup.sh requires a Raspberry Pi running the latest version of Raspberry Pi OS. An assumption is ssh has been setup after burning the microSD Card but prior to inserting it in the RPi. The Localisation Option in raspi-config cannot be automated. So, raspi-config must be run before this sscript. rpi_setup.sh sets up a Raspberry Pi the way I want it. The goal is to minimize the time it takes me to setup a Raspberry Pi either on a new project or because I made some catastrophic mistake on a project under development. Also, I like to start from scratch on a project, once I think everything is working as desired, just in casse I missed documented a step. ${Bold}USAGE${Normal} rpi_setup.sh creates a state file called .rpi_setup.state, which tracks the state of the install, and won't repeat things that are already setup, such as, changing the hostname multiple times. The dot in front makes it a hidden file. Use ls -la to see it. The expectation is that this script should be run multiple times until a success message is displayed. Running it multiple times will not break anything. The scrpt makes no attempt to correct issues or back out previous changes. ${Bold}OPTIONS${Normal} 6 Do not disable IPv6 b Do install or configure fail2ban fail2Ban is used for intrusion prevention from brute force attacks c Clear the terminal C Keep camera e Do not install and configure mod_evasive mod_evasive lessens the impact of denial of service attacks f Do not install and configure uncomplicated firewall (ufw) ufw is an easy to usse netfilter firewall h This help H Do not setup headless Headless means there iss no keyboard or monitor attached to the RPi i Do not prevent IP spoofing l Do not enable logwatch Logwatch is a log analysis program. It reads system logs and generates periodic reports based on user criteria. m Do not install and configure rpi_monitor RPi-Monitor is designed to start automatically and collect metrics. The web interface is available on address http://yourHostName.local:8888. r Do not install tools to find rootkits A rootkit is malware designed to provide privileged access to a computer while actively hiding its presence. This script installs utilities that try and find thi smalware on a raspberry pi s Do not harden sysctl u Skip update and upgrade (not recommended) v Show version number ${Bold}TUTORIAL${Normal} ??? needs to a new link, or needs to be removed EOM