Last active
September 29, 2020 11:51
-
-
Save carlosb1/eed83b5d90099ceebce5616084dcbdfa to your computer and use it in GitHub Desktop.
install
This file contains 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 -ex | |
pass_repository="QWt-AqnBNJQryrKyxexy" | |
current_user="optima" | |
sudo apt-get update | |
sudo apt-get install -y curl wget git kmod vim | |
# install docker | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
focal \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce docker-ce-cli containerd.io | |
sudo apt-get install ssh | |
mkdir "/home/optima/videos" | |
mkdir "/home/optima/videos/finished_videos" | |
mkdir "/home/optima/videos/videos_to_save" | |
mkdir "/home/optima/videos/backups" | |
# change for user | |
git clone http://cameracontrol:$pass_repository@gitlab.com/optima-sports/optima-workspace.git | |
cd optima-workspace | |
git checkout camera_v1 | |
INFO=`./camera_control/resources/return_wifi_device_name.sh` | |
echo "NAME_WIFI_ETH=$INFO" >> ./camera_control/resources/devices.config | |
sudo usermod -aG docker "$current_user" | |
cd /home/$current_user/Desktop/ | |
sudo /etc/init.d/docker start | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-Linux-x86_64" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://askubuntu.com/questions/228304/how-do-i-run-a-script-at-start-up