auto update added nginx, codeserver
Fix bug when using symbolic link replace logger
This commit is contained in:
9
docker/code-server/docker-run.sh
Executable file
9
docker/code-server/docker-run.sh
Executable file
@@ -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
|
||||||
|
|
||||||
9
docker/nginx/docker-run.sh
Executable file
9
docker/nginx/docker-run.sh
Executable file
@@ -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
|
||||||
|
|
||||||
@@ -1,14 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
scriptPath=$(dirname "$0")
|
#scriptPath=$(dirname "$0") not working if called from symbolic link
|
||||||
|
scriptPath="$(dirname "$(readlink -f "$0")")"
|
||||||
doWork(){
|
doWork(){
|
||||||
apt update -y
|
apt update -y
|
||||||
apt dist-upgrade -y
|
apt dist-upgrade -y
|
||||||
$scriptPath/../docker/portainer/docker-run.sh
|
$scriptPath/../docker/portainer/docker-run.sh
|
||||||
$scriptPath/../docker/promtail/docker-run.sh
|
$scriptPath/../docker/promtail/docker-run.sh
|
||||||
$scriptPath/../docker/telegraf/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
|
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
|
#example to check logs for autou-pdate
|
||||||
#journalctl --since yesterday -u cron.service | grep auto-update
|
#journalctl --since yesterday -u cron.service | grep auto-update
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user