Skip to content

Instantly share code, notes, and snippets.

@maikosoft
Last active November 8, 2018 20:51
Show Gist options
  • Save maikosoft/1e164f0c69676b570a20140adee7abf5 to your computer and use it in GitHub Desktop.
Save maikosoft/1e164f0c69676b570a20140adee7abf5 to your computer and use it in GitHub Desktop.
setup-server
#!/usr/bin/env bash
echo "Switch to root user"
printf 'EX7Yfrq5\n' | su - root
echo "Installing git"
# root user
apt-get install -y git
echo "Add User account"
printf 'EX7Yfrq5\n' | adduser weatherstation
su - weatherstation
echo "Clone Project https://[email protected]/globalmet/weather-stations.git"
git clone https://[email protected]/globalmet/weather-stations.git
echo "Switch to root user"
printf 'EX7Yfrq5\n' | su - root
yes | ssh-keygen -t rsa -C "[email protected]"
echo "Agrega las llaves al servidor y presiona ENTER para continuar"
read -n 1 -s
echo "Server Setup"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment