init 0.0.10
All checks were successful
Build / Build project (push) Successful in 1m34s

This commit is contained in:
Alexander Zhirov 2025-11-16 07:39:01 +03:00
parent ec3130e805
commit 0fe16466fc
Signed by: alexander
GPG key ID: C8D8BE544A27C511
7 changed files with 76 additions and 0 deletions

13
files/config.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/source/app.d b/source/app.d
index cac73be..3bb7fad 100644
--- a/source/app.d
+++ b/source/app.d
@@ -96,7 +96,7 @@ int main(string[] args)
ProgramArgs argumets = program.parse(args);
- string configFile = argumets.option("config", "config.json");
+ string configFile = argumets.option("config", "/etc/dwatch/config.json");
DWConfig config;

View file

@ -0,0 +1,14 @@
{
"database": "/var/lib/dwatch/data.db",
"logfile": "/var/log/dwatch.log",
"timezone": "Europe/Moscow",
"watch": [
{
"path": "",
"rules": {
"tracking": [],
"ignore": []
}
}
]
}

1
files/dwatch.tmpfiles Normal file
View file

@ -0,0 +1 @@
d /var/lib/dwatch 0755 root root -

15
files/dwatchd.service Normal file
View file

@ -0,0 +1,15 @@
[Unit]
Description=DWatch server daemon for monitoring changes in text files and CLI
ConditionPathExists=/etc/dwatch/config.json
[Service]
Type=simple
ExecStart=/usr/sbin/dwatchd -vvv
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=10s
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target

1
files/series Normal file
View file

@ -0,0 +1 @@
config.patch