Adding systemd units
This commit is contained in:
parent
fe5933c850
commit
aafdf0c9f5
4 changed files with 44 additions and 0 deletions
9
etc/systemd∕system/acmesh-reload.path
Normal file
9
etc/systemd∕system/acmesh-reload.path
Normal 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
|
8
etc/systemd∕system/acmesh-reload.service
Normal file
8
etc/systemd∕system/acmesh-reload.service
Normal 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
|
16
etc/systemd∕system/container-updater.service
Normal file
16
etc/systemd∕system/container-updater.service
Normal 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
|
11
etc/systemd∕system/container-updater.timer
Normal file
11
etc/systemd∕system/container-updater.timer
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Update Containers Daily
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
AccuracySec=1h
|
||||||
|
Persistent=true
|
||||||
|
RandomizedDelaySec=6000
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in a new issue