From 45b5b06e57ec826cf5bfa248cff8566e1c100e93 Mon Sep 17 00:00:00 2001 From: Mario Alegre Date: Mon, 18 May 2020 22:18:32 -0500 Subject: [PATCH] added podman install to install.sh --- install.sh | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) mode change 100644 => 100755 install.sh diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index bfe5bd5..0bbeccf --- a/install.sh +++ b/install.sh @@ -1,13 +1,36 @@ #1/bin/bash -# todo: actually install podman +distro=$(lsb_release -is) +release=$(lsb_release -rs) + +if [[ $distro == "Debian" ]]; then + echo "Detected distro: Debian" + if [[ $release == "10" ]]; then + echo "Detected release: 10" + release=10 + elif [[ $release == "testing" ]]; then + echo "Detected release: testing" + release=Testing + else + echo "Error: failed to detect release" + exit 1 + fi + echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_$release/ /" > /etc/apt/sources.list.d/podman.list + curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_$release/Release.key | sudo apt-key add - + + apt update -y + apt install -y podman +else + echo "Error: failed to detect distro" + exit 1 +fi # copy bin files to /usr/local/bin -rsync -vaSH bin/ /usr/local/bin/ +sudo rsync -vaSH bin/ /usr/local/bin/ # copy shflags to /usr/local/bin as well -rsync -vaSH lib/shflags /usr/local/bin/ +sudo rsync -vaSH lib/shflags /usr/local/bin/ # install systemd startup service -rsync -vaSH lib/containers-startup.service /etc/systemd/system/ -systemctl enable containers-startup.service +#sudo rsync -vaSH lib/containers-startup.service /etc/systemd/system/ +#sudo systemctl enable containers-startup.service