Skip to content

Instantly share code, notes, and snippets.

View dmbeta's full-sized avatar

David β dmbeta

  • D.C.
View GitHub Profile
#!/bin/bash
# Check if the file exists
if [ ! -f /etc/cron.daily/docker-prune ]; then
# Write the command to the file
echo '#!/bin/bash' > /etc/cron.daily/docker-prune
echo 'docker system prune -af --filter "until=$((30*24))h"' >> /etc/cron.daily/docker-prune
# Make the file executable
chmod +x /etc/cron.daily/docker-prune
fi
version: "3"
services:
gluetun:
restart: always
image: qmcgaw/gluetun
container_name: torrent-gluetun
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free-firmware" | tee -a /etc/apt/sources.list
apt update && apt upgrade -y
apt install cockpit cockpit-storaged -y
systemctl start cockpit.socket
systemctl enable cockpit.socket
echo "Cockpit done"
apt install ufw -y
ufw enable