From 63798be294fe647c7685c4e7c1aee5b0524e3919a0a905d6cef537333fa0dea2 Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Thu, 24 Jan 2019 14:22:18 +0000 Subject: [PATCH] Accepting request 668329 from home:ecsos:server - Fix paths in cron and service file. OBS-URL: https://build.opensuse.org/request/show/668329 OBS-URL: https://build.opensuse.org/package/show/network:utilities/matomo?expand=0&rev=22 --- matomo-archive.cron | 4 ++-- matomo-archive.service | 2 +- matomo.changes | 5 +++++ matomo.spec | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/matomo-archive.cron b/matomo-archive.cron index 431e9fe..eecf39f 100644 --- a/matomo-archive.cron +++ b/matomo-archive.cron @@ -3,7 +3,7 @@ # # without CLI -#5 * * * * wwwrun %{_bindir}/php %{ap_serverroot}/%{name}/misc/cron/archive.php --url=http://localhost/matomo/ > /var/log/%{name}/%{name}-archive.log +#5 * * * * wwwrun /usr/bin/php @ap_serverroot@/matomo/misc/cron/archive.php --url=http://localhost/matomo/ > /var/log/matomo/matomo-archive.log # with CLI -5 * * * * wwwrun %{_bindir}/php %{ap_serverroot}/%{name}/console core:archive --url=http://localhost/matomo/ > /var/log/%{name}/%{name}-archive.log +5 * * * * wwwrun /usr/bin/php @ap_serverroot@/matomo/console core:archive --url=http://localhost/matomo/ > /var/log/matomo/matomo-archive.log diff --git a/matomo-archive.service b/matomo-archive.service index 595151a..7414812 100644 --- a/matomo-archive.service +++ b/matomo-archive.service @@ -5,6 +5,6 @@ Description=Auto-Archiving of matomo Reports Type=oneshot User=wwwrun Group=www -ExecStart=/bin/bash -ce "/usr/bin/php /srv/www/matomo/console core:archive --url=http://localhost/matomo/ >> /var/log/matomo/matomo-archive.log 2>&1" +ExecStart=/bin/bash -ce "/usr/bin/php @ap_serverroot@/matomo/console core:archive --url=http://localhost/matomo/ >> /var/log/matomo/matomo-archive.log 2>&1" #StandardOutput=file:/var/log/matomo/matomo-archive.log #StandardError=file:/var/log/matomo/matomo-archive.log diff --git a/matomo.changes b/matomo.changes index 8256b15..bc1b1e6 100644 --- a/matomo.changes +++ b/matomo.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 24 14:17:44 UTC 2019 - ecsos@opensuse.org + +- Fix paths in cron and service file. + ------------------------------------------------------------------- Tue Jan 22 12:31:47 UTC 2019 - ecsos@opensuse.org diff --git a/matomo.spec b/matomo.spec index c257dad..cfe0d94 100644 --- a/matomo.spec +++ b/matomo.spec @@ -124,6 +124,7 @@ install -d -m 0755 %{buildroot}/var/log/%{name} install -D -m 0644 %{SOURCE10} %{buildroot}/%{_sysconfdir}/cron.d/%{name}-archive install -D -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}-archive.service install -D -m 0644 %{SOURCE12} %{buildroot}%{_unitdir}/%{name}-archive.timer +sed -i -e 's|@ap_serverroot@|%{ap_serverroot}|g' %{buildroot}%{_sysconfdir}/cron.d/%{name}-archive sed -i -e 's|@ap_serverroot@|%{ap_serverroot}|g' %{buildroot}%{_unitdir}/%{name}-archive.service %fdupes %{buildroot}/%{_prefix}