Skip to content

Commit

Permalink
Configure kernel commandline
Browse files Browse the repository at this point in the history
  • Loading branch information
manliebert committed Sep 26, 2024
1 parent 4e3abc5 commit 2b6dbdf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions software/installRPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ EOF
echo -ne "${GREEN}# Stopping containers ... \n${ENDCOLOR}"
ssh -t "$DEVICE_USER"@"$DEVICE_IP" sudo docker compose -f /home/pi/CybICS/docker-compose.yaml down || true

###
### add some configs to the kernel command line
### this enables e.g. MEM USAGE values in `docker stats` output
###
echo -ne "${GREEN}# Configure kernel command line ... \n${ENDCOLOR}"
ssh "$DEVICE_USER"@"$DEVICE_IP" /bin/bash <<EOF
set -e
if grep "cgroup_enable=memory swapaccount=1" /boot/firmware/cmdline.txt; then
exit 0
fi
sudo sed -i ' 1 s/.*/& cgroup_enable=memory swapaccount=1/' /boot/firmware/cmdline.txt
EOF

###
### Increasing swap size
###
Expand Down

0 comments on commit 2b6dbdf

Please sign in to comment.