From 8edf53c14203bca15b39a9778abe23e14d707a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Mon, 13 Apr 2020 21:36:03 +0200 Subject: [PATCH] Add systemd unit/timer for the cleanup tool (#210) * add systemd service for the cleanup script * add systemd timer for the cleanup service --- linx-cleanup.service | 12 ++++++++++++ linx-cleanup.timer | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 linx-cleanup.service create mode 100644 linx-cleanup.timer diff --git a/linx-cleanup.service b/linx-cleanup.service new file mode 100644 index 0000000..7a03941 --- /dev/null +++ b/linx-cleanup.service @@ -0,0 +1,12 @@ +[Unit] +Description=Self-hosted file/code/media sharing (expired files cleanup) +After=network.target + +[Service] +User=linx +Group=linx +ExecStart=/usr/bin/linx-cleanup +WorkingDirectory=/srv/linx/ + +[Install] +WantedBy=multi-user.target diff --git a/linx-cleanup.timer b/linx-cleanup.timer new file mode 100644 index 0000000..40d8cda --- /dev/null +++ b/linx-cleanup.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Run linx-cleanup every hour + +[Timer] +OnUnitActiveSec=1h + +[Install] +WantedBy=timers.target