Adding systemd units

This commit is contained in:
mustard 2024-08-25 15:39:50 +02:00
parent fe5933c850
commit aafdf0c9f5
4 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,9 @@
[Unit]
Description=Reload NGINX on command from acme.sh
[Path]
PathModified=/root/data/acme.sh/.reload
TriggerLimitIntervalSec=0
TriggerLimitBurst=0
[Install]
WantedBy=paths.target

View file

@ -0,0 +1,8 @@
# This service cannot and should not be enabled directly.
[Unit]
Description=Reload NGINX on command from acme.sh
[Service]
Type=oneshot
ExecStart=/usr/bin/docker restart reverse_proxy
ExecStart=/usr/bin/rm /root/data/acme.sh/.reload
#ExecStart=/usr/bin/touch /root/amogus.txt

View file

@ -0,0 +1,16 @@
[Unit]
Description=Automatic Container Updater
After=docker.service
Requires=network-online.target
Requires=docker.service
[Service]
User=root
Group=root
WorkingDirectory=/root
ExecStart=/usr/bin/docker compose pull
ExecStart=/usr/bin/docker compose up -d
Type=oneshot
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,11 @@
[Unit]
Description=Update Containers Daily
[Timer]
OnCalendar=daily
AccuracySec=1h
Persistent=true
RandomizedDelaySec=6000
[Install]
WantedBy=timers.target