Fix Podman setup

This commit is contained in:
Viyurz 2024-10-01 14:44:37 +02:00
parent 756c20381a
commit 5a9513247f
Signed by: Viyurz
SSH key fingerprint: SHA256:IskOHTmhHSJIvAt04N6aaxd5SZCVWW1Guf9tEcxIMj8
2 changed files with 5 additions and 17 deletions

View file

@ -1,9 +0,0 @@
[Unit]
Description=Podman User Service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/podman start --all
ExecStop=/usr/bin/podman stop --all
Restart=/usr/bin/podman restart --all

View file

@ -17,11 +17,6 @@ done
sudo loginctl enable-linger $USER sudo loginctl enable-linger $USER
mkdir -p "$HOME/.config/systemd/user"
cp "$(dirname "$0")/podman.service" "$HOME/.config/systemd/user/podman.service"
declare -A sysctl_vars=( declare -A sysctl_vars=(
[vm.overcommit_memory]=1 [vm.overcommit_memory]=1
[net.core.wmem_max]=2500000 [net.core.wmem_max]=2500000
@ -36,6 +31,8 @@ for key in "${!sysctl_vars[@]}"; do
done done
systemctl enable --now nftables for unit in podman.service podman.socket podman-restart.service; do
systemctl --user daemon-reload systemctl --user enable --now "$unit"
systemctl --user restart podman done
sudo systemctl enable --now nftables