mirror of
https://github.com/tomasriveral/vps-config.git
synced 2026-08-11 18:18:38 +02:00
autoupdates
This commit is contained in:
@@ -213,6 +213,7 @@ cp systemd/server-backup.* /etc/systemd/system/
|
||||
cp systemd/freshrss-fav-archiver.* /etc/systemd/system/
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now server-backup.timer
|
||||
systemctl enable --now update-server.timer
|
||||
systemctl enable --now freshrss-fav-archiver.timer
|
||||
|
||||
###############################################################################
|
||||
|
||||
+5
-1
@@ -1,8 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
apt update -y
|
||||
apt upgrade -y
|
||||
|
||||
cd /home/tomasr/vps-config
|
||||
|
||||
docker compose down
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
docker image prune -f
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=Run nightly server rsync backup
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 02:00:00
|
||||
OnCalendar=*-*-* 00:00:00
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Descript=Nightly update of the server apt packages and docker images. Also restart all the docker images.
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/home/tomasr/vps-config/scripts/update.sh
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Run nightly server update
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 02:00:00
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user