Add systemd unit/timer for the cleanup tool (#210)

* add systemd service for the cleanup script

* add systemd timer for the cleanup service
This commit is contained in:
Björn 2020-04-13 21:36:03 +02:00 committed by GitHub
parent 9f7e6b6eea
commit 8edf53c142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

12
linx-cleanup.service Normal file
View File

@ -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

8
linx-cleanup.timer Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Run linx-cleanup every hour
[Timer]
OnUnitActiveSec=1h
[Install]
WantedBy=timers.target