Skip to content

Commit

Permalink
Fix #34: use correct chgrp when configuring containerd service file
Browse files Browse the repository at this point in the history
  • Loading branch information
innobead committed Oct 14, 2020
1 parent 468662e commit 8d8a413
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/install-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ function install_containerd() {
curl -sfSLO "https://raw.githubusercontent.com/containerd/containerd/${CONTAINERD_VERSION}/containerd.service"
sudo groupadd containerd || true
sudo mv containerd.service /etc/systemd/system/containerd.service
sudo sed -i -E "s#(ExecStart=/usr/local/bin/containerd)#\1\nExecStartPost=/usr/bin/chgrp containerd /run/containerd/containerd.sock#g" /etc/systemd/system/containerd.service

chgrp_path=$(command -v chgrp || tr -d '\n')
sudo sed -i -E "s#(ExecStart=/usr/local/bin/containerd)#\1\nExecStartPost=${chgrp_path} containerd /run/containerd/containerd.sock#g" /etc/systemd/system/containerd.service

sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml >/dev/null
Expand Down

0 comments on commit 8d8a413

Please sign in to comment.