diff --git a/etc/systemd∕system/acmesh-reload.path b/etc/systemd∕system/acmesh-reload.path new file mode 100644 index 0000000..f0f961d --- /dev/null +++ b/etc/systemd∕system/acmesh-reload.path @@ -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 diff --git a/etc/systemd∕system/acmesh-reload.service b/etc/systemd∕system/acmesh-reload.service new file mode 100644 index 0000000..2e4b154 --- /dev/null +++ b/etc/systemd∕system/acmesh-reload.service @@ -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 diff --git a/etc/systemd∕system/container-updater.service b/etc/systemd∕system/container-updater.service new file mode 100644 index 0000000..6580544 --- /dev/null +++ b/etc/systemd∕system/container-updater.service @@ -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 diff --git a/etc/systemd∕system/container-updater.timer b/etc/systemd∕system/container-updater.timer new file mode 100644 index 0000000..4ca6a38 --- /dev/null +++ b/etc/systemd∕system/container-updater.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Update Containers Daily + +[Timer] +OnCalendar=daily +AccuracySec=1h +Persistent=true +RandomizedDelaySec=6000 + +[Install] +WantedBy=timers.target