From 1e9e20a07171d18afaba36a41a95c0cdaac76d5d Mon Sep 17 00:00:00 2001 From: Felix Schulze <39433012+thefeli73@users.noreply.github.com> Date: Wed, 22 Feb 2023 09:54:38 +0100 Subject: [PATCH] Create run.sh --- run.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 run.sh diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..0124e43 --- /dev/null +++ b/run.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +cd /root + +#updates +apt update && apt upgrade -y +apt install -y unattended-upgrades apt-config-auto-update + +#docker +apt install -y curl +curl -fsSL https://get.docker.com -o get-docker.sh +sh ./get-docker.sh +touch docker-compose.yml + +#update script +cat >> update.sh << 'END' +#!/bin/bash + +cd /root +docker compose pull +docker compose up --detach --force-recreate --pull always +docker image prune -f +END + +chmod +x update.sh +ln -s /root/update.sh /etc/cron.weekly/update_docker