aboutsummaryrefslogtreecommitdiff
path: root/etc/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'etc/systemd')
-rw-r--r--etc/systemd/brep-clean.service5
-rw-r--r--etc/systemd/brep-clean.timer4
-rw-r--r--etc/systemd/brep-monitor.service14
-rw-r--r--etc/systemd/brep-monitor.timer23
4 files changed, 43 insertions, 3 deletions
diff --git a/etc/systemd/brep-clean.service b/etc/systemd/brep-clean.service
index 739a54a..d2e5630 100644
--- a/etc/systemd/brep-clean.service
+++ b/etc/systemd/brep-clean.service
@@ -1,5 +1,5 @@
[Unit]
-Description=brep build database cleaner service
+Description=brep build database and artifacts cleaner service
[Service]
Type=oneshot
@@ -7,9 +7,12 @@ Type=oneshot
#Group=brep
# Run both tenants and builds cleaners if CI request functionality is enabled.
+# Also run outdated build artifacts cleaners if build artifacts upload
+# functionality is enabled.
#
#ExecStart=/home/brep/install/bin/brep-clean tenants 240
ExecStart=/home/brep/install/bin/brep-clean builds /home/brep/config/buildtab
+#ExecStart=/home/brep/install/bin/brep-upload-bindist-clean /var/bindist 2880
[Install]
WantedBy=default.target
diff --git a/etc/systemd/brep-clean.timer b/etc/systemd/brep-clean.timer
index f4c587e..8e1e6e7 100644
--- a/etc/systemd/brep-clean.timer
+++ b/etc/systemd/brep-clean.timer
@@ -10,9 +10,9 @@ Unit=brep-clean.service
#
Persistent=false
-# Wait 20 seconds until the first run.
+# Wait 30 seconds until the first run.
#
-OnBootSec=20
+OnBootSec=30
# Then wait 5 minutes until the next run.
#
diff --git a/etc/systemd/brep-monitor.service b/etc/systemd/brep-monitor.service
new file mode 100644
index 0000000..0a5c25e
--- /dev/null
+++ b/etc/systemd/brep-monitor.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=brep infrastructure monitor service
+
+[Service]
+Type=oneshot
+#User=brep
+#Group=brep
+
+# Replace the public toolchain name with a real list of toolchains.
+#
+ExecStart=/home/brep/install/bin/brep-monitor --report-timeout 86400 --clean /home/brep/config/brep-module.conf public
+
+[Install]
+WantedBy=default.target
diff --git a/etc/systemd/brep-monitor.timer b/etc/systemd/brep-monitor.timer
new file mode 100644
index 0000000..f5f5a64
--- /dev/null
+++ b/etc/systemd/brep-monitor.timer
@@ -0,0 +1,23 @@
+[Unit]
+Description=brep infrastructure monitor timer
+RefuseManualStart=no
+RefuseManualStop=no
+
+[Timer]
+Unit=brep-monitor.service
+
+# Don't keep track of the timer across reboots.
+#
+Persistent=false
+
+# Wait 40 seconds until the first run.
+#
+OnBootSec=40
+
+# Then wait 1 hour until the next run.
+#
+OnUnitInactiveSec=1h
+
+
+[Install]
+WantedBy=timers.target