diff --git a/src/Makefile.am b/src/Makefile.am index 081430f7..2140977b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -357,6 +357,8 @@ doc/user/custom.xsl doc/user/usermanual.xml \ filters/injectcommon.sh filters/recfiltcommon filters/rcltxtlines.py \ \ index/rclmon.sh \ +index/recollindex-system.service \ +index/recollindex-user.service \ \ kde/kioslave/kio_recoll/00README.txt \ kde/kioslave/kio_recoll/CMakeLists.txt \ @@ -652,6 +654,8 @@ defconfdir = $(pkgdatadir)/examples defconf_DATA = \ desktop/recollindex.desktop \ index/rclmon.sh \ +index/recollindex-system.service \ +index/recollindex-user.service \ sampleconf/fragbuts.xml \ sampleconf/fields \ sampleconf/recoll.conf \ diff --git a/src/doc/user/usermanual.html b/src/doc/user/usermanual.html index 6db29f82..f98f2540 100644 --- a/src/doc/user/usermanual.html +++ b/src/doc/user/usermanual.html @@ -423,7 +423,7 @@ alink="#0000FF">

List of Tables

-
3.1. Keyboard shortcuts
+
3.1. Keyboard shortcuts
@@ -2576,6 +2576,43 @@ metadatacmds = ; recoll GUI also has a menu entry for this.

+
+
+
+
+

Automatic + daemon start with systemd

+
+
+
+

The installation contains two example files (in + share/recoll/examples) for + starting the indexing daemon with systemd.

+

recollindex-user.service + would be used for starting recollindex as a user + service, and can be installed with the following + commands:

+
systemctl --user link /usr/share/recoll/examples/recollindex-user.service
+systemctl --user enable --now recollindex-user.service
+

The indexer will start when the user logs in and run + while there is a session open for them.

+

recollindex-system.service would be + used for starting the indexer at boot time, running as a + specific user. It can be useful when running the text + search as a shared service (e.g. when users access it + through the WEB UI). You will need to edit it to replace + the @SOMEUSER@ value with something which makes sense in + your case, then install it as a regular systemd system service. Of course, + if you want to run several such units, you will also need + to rename the installed file.

+
@@ -2583,7 +2620,7 @@ metadatacmds = ; Automatic daemon - start + start from the desktop session
@@ -4017,7 +4054,7 @@ fs.inotify.max_user_watches=32768 given context (e.g. within a preview window, within the result table).

- +

Table 3.1. Keyboard shortcuts

diff --git a/src/doc/user/usermanual.xml b/src/doc/user/usermanual.xml index ea717172..5c9848fe 100644 --- a/src/doc/user/usermanual.xml +++ b/src/doc/user/usermanual.xml @@ -1769,8 +1769,31 @@ metadatacmds = ; tags = tmsu tags %f process. The recoll GUI also has a menu entry for this. + + Automatic daemon start with systemd + + The installation contains two example files + (in share/recoll/examples) for starting the indexing daemon with + systemd. + recollindex-user.service would be used for + starting recollindex as a user service, and can be installed with the + following commands: +systemctl --user link /usr/share/recoll/examples/recollindex-user.service +systemctl --user enable --now recollindex-user.service + The indexer will start when the user logs in and run while there is a session open for + them. + + recollindex-system.service would be used for starting the indexer + at boot time, running as a specific user. It can be useful when running the text search as a + shared service (e.g. when users access it through the WEB UI). You will need to edit it to + replace the @SOMEUSER@ value with something which makes sense in your case, then install it + as a regular systemd system service. Of course, if you want to + run several such units, you will also need to rename the installed file. + + + - Automatic daemon start + Automatic daemon start from the desktop session Under KDE, Gnome and some other desktop diff --git a/src/index/recollindex-system.service b/src/index/recollindex-system.service new file mode 100644 index 00000000..fc15075a --- /dev/null +++ b/src/index/recollindex-system.service @@ -0,0 +1,14 @@ +[Unit] +Description=Recollindex indexing for @SOMEUSER@ +After=network-online.target +RequiresMountsFor=/home/@SOMEUSER@ + +[Service] +Type=simple +Restart=on-failure +RestartSec=30 +ExecStart=/usr/bin/recollindex -m -D -x -w 10 -c /home/@SOMEUSER@/.recoll +User=@SOMEUSER@ + +[Install] +WantedBy=multi-user.target diff --git a/src/index/recollindex-user.service b/src/index/recollindex-user.service new file mode 100644 index 00000000..48d4655f --- /dev/null +++ b/src/index/recollindex-user.service @@ -0,0 +1,12 @@ +# Contributed by Frank Dana, licensed as Recoll itself +[Unit] +Description=Recoll real-time document indexing +After=gnome-session-manager.target + +[Service] +Type=simple +ExecStart=/usr/bin/recollindex -m -D -x -w 30 -c %h/.recoll/ +Restart=on-failure + +[Install] +WantedBy=graphical-session.target diff --git a/tests/chm/chm.txt b/tests/chm/chm.txt index 85c55d19..7ba23a88 100644 --- a/tests/chm/chm.txt +++ b/tests/chm/chm.txt @@ -1,11 +1,11 @@ 1 results -text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/Nokia_Nseries_Help_jpn.chm] [デジタル著作権管理(DRM)] 2948 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/Nokia_Nseries_Help_jpn.chm] [デジタル著作権管理(DRM)] 2947 bytes 2 results -text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/soundrec.chm] [Superposer (mixer) des fichiers son] 2279 bytes -text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/zippedsoundrec.zip] [Superposer (mixer) des fichiers son] 2279 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/soundrec.chm] [Superposer (mixer) des fichiers son] 2278 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/zippedsoundrec.zip] [Superposer (mixer) des fichiers son] 2278 bytes 1 results -text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/Django-1.1a1-r9905.chm] [User authentication in Django] 115179 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/Django-1.1a1-r9905.chm] [User authentication in Django] 115178 bytes 1 results -text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/PMGlossary.chm] [Project Management Glossary: P09] 64703 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/PMGlossary.chm] [Project Management Glossary: P09] 64702 bytes 1 results -text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/2006Susla-handbookCriticalCareDrugTherapy.CHM] [Ovid: Handbook of Critical Care Drug Therapy] 124329 bytes +text/html [file:///home/dockes/projets/fulltext/testrecoll/chm/2006Susla-handbookCriticalCareDrugTherapy.CHM] [Ovid: Handbook of Critical Care Drug Therapy] 124328 bytes