summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse-api/etc/service.conf1
-rw-r--r--gentoobrowse-api/service/Jamfile.jam2
-rw-r--r--gentoobrowse-api/service/maintenanceGitOperations.cpp3
3 files changed, 6 insertions, 0 deletions
diff --git a/gentoobrowse-api/etc/service.conf b/gentoobrowse-api/etc/service.conf
index 39afe49..ee83ffd 100644
--- a/gentoobrowse-api/etc/service.conf
+++ b/gentoobrowse-api/etc/service.conf
@@ -1,3 +1,4 @@
[Service]
User=portage
Group=portage
+NotifyAccess=main
diff --git a/gentoobrowse-api/service/Jamfile.jam b/gentoobrowse-api/service/Jamfile.jam
index 84adc44..2256701 100644
--- a/gentoobrowse-api/service/Jamfile.jam
+++ b/gentoobrowse-api/service/Jamfile.jam
@@ -21,6 +21,7 @@ lib exslt ;
lib xslt : : : : <include>/usr/include/libxslt ;
lib slicer-xml ;
lib esmtp ;
+lib systemd ;
lib gentoobrowse-service++11 :
[ glob-tree *.cpp : bin ]
@@ -34,6 +35,7 @@ lib gentoobrowse-service++11 :
<library>xslt
<library>exslt
<library>esmtp
+ <library>systemd
<library>..//dbppcore
<library>..//IceBox
<library>..//slicer
diff --git a/gentoobrowse-api/service/maintenanceGitOperations.cpp b/gentoobrowse-api/service/maintenanceGitOperations.cpp
index 396ff5a..3249e0a 100644
--- a/gentoobrowse-api/service/maintenanceGitOperations.cpp
+++ b/gentoobrowse-api/service/maintenanceGitOperations.cpp
@@ -13,6 +13,7 @@
#include "utils/git.h"
#include "converters.impl.h"
#include <compileTimeFormatter.h>
+#include <systemd/sd-daemon.h>
namespace Gentoo {
namespace Service {
@@ -173,6 +174,8 @@ namespace Gentoo {
auto changes = refreshRepository(dbc.get(), properties, repo);
this->applyFileChanges(dbc.get(), repoRoot, repo, changes);
}
+ time_t now = time(nullptr);
+ sd_notifyf(0, "STATUS=Last update %s", ctime(&now));
}
AdHocFormatter(UpdatingFileContent, "Updating file content\n");