From e6f997a7918d4e53f765b866d3775cc38d1a7ee5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 18 Dec 2015 10:34:35 +0200 Subject: Add systemd-based setup instruction for periodic loader execution --- INSTALL | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'INSTALL') diff --git a/INSTALL b/INSTALL index 65c9146..7519bb2 100644 --- a/INSTALL +++ b/INSTALL @@ -187,7 +187,40 @@ To verify, visit the repository root. To troubleshoot, see Apache logs. 7. Setup Periodic Loader Execution -@@ TODO +In this guide we will use the systemd user session to periodically run loader +as the brep user. If your installation doesn't use systemd, then a cron job +would be a natural alternative. + +As the first step, make sure systemd user sessions support is working for the +brep user: + +$ systemctl --user status + +If there are any errors, make sure the dbus and libpam-systemd packages are +installed, relogin as brep, and try again. If it still doesn't work, google +for the error message and your distribution name. + +Next enable the brep's systemd session to remain running after logging off +since we want the loader to run even when we are not logged in: + +$ sudo loginctl enable-linger brep + +$ mkdir -p .config/systemd/user +$ cp install/share/brep/etc/systemd/brep-loader.* .config/systemd/user/ + +Start the service to make sure there are no issues: + +$ systemctl --user start brep-loader.service +$ journalctl + +Start the timer and monitor it to make sure it fires: + +$ systemctl --user start brep-loader.timer +$ journalctl -f + +If everything looks good, enable the timer to be started at boot time: + +$ systemctl --user enable brep-loader.timer 8. Upgrade procedure @@ -201,3 +234,5 @@ To verify, visit the repository root. To troubleshoot, see Apache logs. - start apache - save old config, install + +systemctl --user daemon-reload -- cgit v1.1