0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 14:56:16 +00:00
termux-packages/root-packages/vnstat/src-common.h.patch
Dennis 3d8f09c2f4
new package: vnstat (#19323)
vnstatd needs to be run as root since it reads /sys/class/net.
vnstat also needs root since it reads databse from vnstatd.
vnstati pulls in libgd as dependency which depends on x11 libs

- service script + service finish
- vnstati subpackage

closes #10143
2024-02-22 15:36:24 +01:00

25 lines
865 B
Diff

diff --git a/src/common.h b/src/common.h
index c528a5d..8e782c0 100644
--- a/src/common.h
+++ b/src/common.h
@@ -64,7 +64,7 @@ and most can be changed later from the config file.
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
#define DATABASEDIR "/var/db/vnstat"
#else
-#define DATABASEDIR "/var/lib/vnstat"
+#define DATABASEDIR "@TERMUX_PREFIX@/var/lib/vnstat"
#endif
#endif
@@ -259,8 +259,8 @@ and most can be changed later from the config file.
#define USELOGGING 2
#define CREATEDIRS 1
#define UPDATEFILEOWNER 1
-#define LOGFILE "/var/log/vnstat/vnstat.log"
-#define PIDFILE "/var/run/vnstat/vnstat.pid"
+#define LOGFILE "@TERMUX_PREFIX@/var/log/vnstat/vnstat.log"
+#define PIDFILE "@TERMUX_PREFIX@/var/run/vnstat/vnstat.pid"
#define IS64BIT -2
#define WALDB 0
#define WALDBCHECKPOINTINTERVALMINS 240