diff --git a/docker/code-server/docker-run.sh b/docker/code-server/docker-run.sh new file mode 100755 index 0000000..99ecf2e --- /dev/null +++ b/docker/code-server/docker-run.sh @@ -0,0 +1,9 @@ +#! /bin/bash +scriptPath="$(dirname "$(readlink -f "$0")")" +currentPath=$PWD + +cd $scriptPath +docker-compose pull +docker-compose up --force-recreate --build -d +cd $currentPath + diff --git a/docker/nginx/docker-run.sh b/docker/nginx/docker-run.sh new file mode 100755 index 0000000..99ecf2e --- /dev/null +++ b/docker/nginx/docker-run.sh @@ -0,0 +1,9 @@ +#! /bin/bash +scriptPath="$(dirname "$(readlink -f "$0")")" +currentPath=$PWD + +cd $scriptPath +docker-compose pull +docker-compose up --force-recreate --build -d +cd $currentPath + diff --git a/scripts/auto-update.sh b/scripts/auto-update.sh index 931d2a6..f02026b 100755 --- a/scripts/auto-update.sh +++ b/scripts/auto-update.sh @@ -1,14 +1,19 @@ #!/bin/bash -scriptPath=$(dirname "$0") +#scriptPath=$(dirname "$0") not working if called from symbolic link +scriptPath="$(dirname "$(readlink -f "$0")")" doWork(){ apt update -y apt dist-upgrade -y $scriptPath/../docker/portainer/docker-run.sh $scriptPath/../docker/promtail/docker-run.sh $scriptPath/../docker/telegraf/docker-run.sh + $scriptPath/../docker/code-server/docker-run.sh + $scriptPath/../docker/nginx/docker-run.sh docker image prune -f } -doWork 2>&1 | systemd-cat -t "auto-update" +doWork 2>&1 | logger -s -t "auto-update" + +#doWork 2>&1 | logger -t "auto-update" #example to check logs for autou-pdate #journalctl --since yesterday -u cron.service | grep auto-update exit 0