
1 changed files with 28 additions and 5 deletions
@ -1,13 +1,36 @@ |
|||||
#1/bin/bash |
#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 |
# 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 |
# 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 |
# install systemd startup service |
||||
rsync -vaSH lib/containers-startup.service /etc/systemd/system/ |
#sudo rsync -vaSH lib/containers-startup.service /etc/systemd/system/ |
||||
systemctl enable containers-startup.service |
#sudo systemctl enable containers-startup.service |
||||
|
Loading…
Reference in new issue