Last active
April 10, 2018 14:45
-
-
Save mnadjit/dd80b63538db2f42dc9af8b02ad12c07 to your computer and use it in GitHub Desktop.
Debian Raspberry Pi (Raspbian) Scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get remove docker docker-engine docker.io | |
curl -fsSL get.docker.com -o get-docker.sh | |
sudo sh get-docker.sh | |
echo "Please enter username to add to Docker group to run Docker as non-root user:" | |
read username | |
sudo usermod -aG docker $username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Raspbian version 9 | |
# Set variables | |
ssid=myssid | |
wifipasswd=mypassword | |
userpasswd=userpassword | |
rootpasswd=rootpassword | |
# -------------------------------- Run under login user ------------------------------ | |
# Change locality | |
setxkbmap us # Set Keyboard layout to English (US) for this user | |
# TODO Set keyboard layout variant | |
# TODO Set WiFi Country | |
# -------------------------------- Run under ROOT user ------------------------------- | |
# Switch to root user and change its password | |
sudo su | |
passwd | |
$rootpasswd | |
$rootpasswd | |
# -------------------------------- | |
# Set locality | |
setxkbmap us # Set keyboard layout to English (US) for root user | |
localectl set-locale LANG="en_AU.UTF-8" # | |
# -------------------------------- | |
# Set Timezone | |
"Australia/Melbourne" > /etc/timezone | |
export TZ=Australia/Melbourne | |
# -------------------------------- | |
# Configure Wifi connection | |
wpa_passphrase "$ssid" "$wifipasswd" >> /etc/wpa_supplicant/wpa_supplicant.conf # add encrypted passphrase to config file | |
# TODO: remove free text from config file | |
wpa_cli -i wlan0 reconfigure # reset wireless interface | |
# -------------------------------- | |
# Enable/Disable Run/Stop Services | |
systemctl enable ssh # enable ssh | |
systemctl start ssh # start ssh | |
systemctl stop bluetooth # stop bluetooth | |
systemctl disable bluetooth # disable bluetooth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment