summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD28
-rw-r--r--nextcloud-cron.service2
-rw-r--r--nextcloud-cron.timer2
-rw-r--r--nextcloud-files-scan-all.service (renamed from nextcloud-filescan.service)2
-rw-r--r--nextcloud-files-scan-all.timer (renamed from nextcloud-filescan.timer)2
-rw-r--r--nextcloud-preview-generate-all.service9
-rw-r--r--nextcloud-preview-generate-all.timer10
-rw-r--r--nextcloud-preview-pre-generate.service (renamed from nextcloud-preview.service)2
-rw-r--r--nextcloud-preview-pre-generate.timer9
-rw-r--r--nextcloud-preview.timer9
-rw-r--r--nextcloud-systemd-timers.install31
12 files changed, 85 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e64b2c4018d..fb4b2723493 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,27 @@
pkgbase = nextcloud-systemd-timers
pkgdesc = Systemd services and timers for Nextcloud background jobs (see Nextcloud Arch Wiki entry).
- pkgver = 0.4
- pkgrel = 2
+ pkgver = 0.5
+ pkgrel = 1
install = nextcloud-systemd-timers.install
arch = any
license = GPL
conflicts = nextcloud-systemd-cron
source = nextcloud-cron.service
source = nextcloud-cron.timer
- source = nextcloud-preview.service
- source = nextcloud-preview.timer
- source = nextcloud-filescan.service
- source = nextcloud-filescan.timer
- md5sums = 78dbe72845222ad01aafb60f32f828e8
- md5sums = fff77f3c2c11c5928470cd0816ec4b4e
- md5sums = a019ced938dc5a6c1cc59e05c5a88be3
- md5sums = a9cbb757ac34fcf636653086afd581d5
- md5sums = ca8393b6ddb3cc4d23cef10ec02bc271
- md5sums = 6860cf4c5b712c37a1f942d661256107
+ source = nextcloud-preview-pre-generate.service
+ source = nextcloud-preview-pre-generate.timer
+ source = nextcloud-preview-generate-all.service
+ source = nextcloud-preview-generate-all.timer
+ source = nextcloud-files-scan-all.service
+ source = nextcloud-files-scan-all.timer
+ md5sums = 53a5345c92f56045c59cb3ffd91b20fc
+ md5sums = 15826e34b6d24b9fe7d1eaa8df27c026
+ md5sums = 4d6a98593b90f9aed1bdcb186bc4ca5c
+ md5sums = b986c3d1a3ca1243a0c25ea0b835598c
+ md5sums = 979a3979fa0fa2fba3a3fe94d877f3d9
+ md5sums = 05faa4afcc1705a8c03f0d197e0e763f
+ md5sums = 01ff280f5a1ca4d4f49cce54d72e7cb9
+ md5sums = 67dff9d43283939a02c3779266e2c3d3
pkgname = nextcloud-systemd-timers
diff --git a/PKGBUILD b/PKGBUILD
index 639b6ec68b5..567fabd02ac 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Dominik Schrempf <dominik.schrempf@gmail.com>
pkgname=nextcloud-systemd-timers
-pkgver=0.4
-pkgrel=2
+pkgver=0.5
+pkgrel=1
epoch=
pkgdesc="Systemd services and timers for Nextcloud background jobs (see Nextcloud Arch Wiki entry)."
arch=('any')
@@ -21,16 +21,20 @@ install=nextcloud-systemd-timers.install
changelog=
source=("nextcloud-cron.service"
"nextcloud-cron.timer"
- "nextcloud-preview.service"
- "nextcloud-preview.timer"
- "nextcloud-filescan.service"
- "nextcloud-filescan.timer")
-md5sums=('78dbe72845222ad01aafb60f32f828e8'
- 'fff77f3c2c11c5928470cd0816ec4b4e'
- 'a019ced938dc5a6c1cc59e05c5a88be3'
- 'a9cbb757ac34fcf636653086afd581d5'
- 'ca8393b6ddb3cc4d23cef10ec02bc271'
- '6860cf4c5b712c37a1f942d661256107')
+ "nextcloud-preview-pre-generate.service"
+ "nextcloud-preview-pre-generate.timer"
+ "nextcloud-preview-generate-all.service"
+ "nextcloud-preview-generate-all.timer"
+ "nextcloud-files-scan-all.service"
+ "nextcloud-files-scan-all.timer")
+md5sums=('53a5345c92f56045c59cb3ffd91b20fc'
+ '15826e34b6d24b9fe7d1eaa8df27c026'
+ '4d6a98593b90f9aed1bdcb186bc4ca5c'
+ 'b986c3d1a3ca1243a0c25ea0b835598c'
+ '979a3979fa0fa2fba3a3fe94d877f3d9'
+ '05faa4afcc1705a8c03f0d197e0e763f'
+ '01ff280f5a1ca4d4f49cce54d72e7cb9'
+ '67dff9d43283939a02c3779266e2c3d3')
noextract=()
# prepare() {
diff --git a/nextcloud-cron.service b/nextcloud-cron.service
index 63cf94de310..15844c40c10 100644
--- a/nextcloud-cron.service
+++ b/nextcloud-cron.service
@@ -1,5 +1,5 @@
[Unit]
-Description=Nextcloud cron.php
+Description=Nextcloud; run cron.php
[Service]
User=http
diff --git a/nextcloud-cron.timer b/nextcloud-cron.timer
index 4b8bc606e34..7bc587ff1f5 100644
--- a/nextcloud-cron.timer
+++ b/nextcloud-cron.timer
@@ -1,5 +1,5 @@
[Unit]
-Description=Nextcloud cron.php
+Description=Nextcloud; periodically run cron.php
[Timer]
OnBootSec=5min
diff --git a/nextcloud-filescan.service b/nextcloud-files-scan-all.service
index ee13b0c6bdc..3bbe7f7e264 100644
--- a/nextcloud-filescan.service
+++ b/nextcloud-files-scan-all.service
@@ -1,5 +1,5 @@
[Unit]
-Description=Nextcloud file scan
+Description=Nextcloud; scan all files
[Service]
User=http
diff --git a/nextcloud-filescan.timer b/nextcloud-files-scan-all.timer
index e5920f075b0..70563efc36e 100644
--- a/nextcloud-filescan.timer
+++ b/nextcloud-files-scan-all.timer
@@ -1,5 +1,5 @@
[Unit]
-Description=Nextcloud file scan
+Description=Nextcloud; weekly scan all files
[Timer]
OnBootSec=15min
diff --git a/nextcloud-preview-generate-all.service b/nextcloud-preview-generate-all.service
new file mode 100644
index 00000000000..b18c0be410d
--- /dev/null
+++ b/nextcloud-preview-generate-all.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Nextcloud; generate previews for all files
+
+[Service]
+User=http
+ExecStart=/usr/share/webapps/nextcloud/occ preview:generate-all
+
+[Install]
+WantedBy=basic.target
diff --git a/nextcloud-preview-generate-all.timer b/nextcloud-preview-generate-all.timer
new file mode 100644
index 00000000000..a1b2b1909ba
--- /dev/null
+++ b/nextcloud-preview-generate-all.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Nextcloud; weekly generate previews for all files
+
+[Timer]
+OnBootSec=20min
+OnCalendar=weekly
+Persistent=True
+
+[Install]
+WantedBy=timers.target \ No newline at end of file
diff --git a/nextcloud-preview.service b/nextcloud-preview-pre-generate.service
index 448f730d155..cf39f37ff77 100644
--- a/nextcloud-preview.service
+++ b/nextcloud-preview-pre-generate.service
@@ -1,5 +1,5 @@
[Unit]
-Description=Nextcloud preview generation
+Description=Nextcloud; generate previews for new files only
[Service]
User=http
diff --git a/nextcloud-preview-pre-generate.timer b/nextcloud-preview-pre-generate.timer
new file mode 100644
index 00000000000..28095b0f3f0
--- /dev/null
+++ b/nextcloud-preview-pre-generate.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Nextcloud; periodically generate previews for new files only
+
+[Timer]
+OnBootSec=10min
+OnUnitActiveSec=15min
+
+[Install]
+WantedBy=timers.target \ No newline at end of file
diff --git a/nextcloud-preview.timer b/nextcloud-preview.timer
deleted file mode 100644
index f906d54fdf7..00000000000
--- a/nextcloud-preview.timer
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Nextcloud preview generation
-
-[Timer]
-OnBootSec=10min
-OnUnitActiveSec=15min
-
-[Install]
-WantedBy=timers.target \ No newline at end of file
diff --git a/nextcloud-systemd-timers.install b/nextcloud-systemd-timers.install
index cd45b0db2ed..9d8f258afae 100644
--- a/nextcloud-systemd-timers.install
+++ b/nextcloud-systemd-timers.install
@@ -10,18 +10,27 @@
## arg 1: the new package version
post_install() {
# do something here
- echo 'Reload systemd daemon.'
+ echo "In order to complete installation, manual steps are necessary."
+ echo "The timers can be activated individually and according to your needs."
+ echo "--"
+ echo "Reload systemd daemon."
echo '$ systemctl daemon-reload'
- echo "Activate Cron timer with"
- echo '$ systemctl start nextcloud-cron.timer'
- echo '$ systemctl enable nextcloud-cron.timer'
- echo "Activate periodic file scans with"
- echo '$ systemctl start nextcloud-filescan.timer'
- echo '$ systemctl enable nextcloud-filescan.timer'
- echo "Activate periodic preview generation with"
- echo '$ systemctl start nextcloud-preview.timer'
- echo '$ systemctl enable nextcloud-preview.timer'
- echo 'Check if wanted timers are activated with'
+ echo "--"
+ echo "Activate timer TIMER."
+ echo '$ systemctl start TIMER'
+ echo '$ systemctl enable TIMER'
+ echo "--"
+ echo "Available timers."
+ echo "- nextcloud-cron.timer"
+ echo " Periodic execution of cron.php."
+ echo "- nextcloud-files-scan-all.timer"
+ echo " Activate periodic scans of ALL files."
+ echo "- nextcloud-preview-generate-all.timer"
+ echo " Activate periodic preview generation of ALL files."
+ echo "- nextcloud-preview-pre-generate.timer"
+ echo " Activate periodic preview generation of NEW files."
+ echo "--"
+ echo "Check status and activation of timers."
echo '$ systemctl list-timers'
}