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

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# dwatch
Отслеживание изменений в файлах.

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

29
package.yml Normal file
View file

@ -0,0 +1,29 @@
name : dwatch
version : 0.0.10
release : 1
source :
- git|https://git.zhirov.kz/dwatch/dwatch.git : 35319d42c4bf81583f6978a857b8b0fc41ceb11f
homepage : https://git.zhirov.kz/dwatch/dwatch
license : BSL-1.0
component : system.utils
summary : Monitoring changes in text files.
description: |
Monitoring changes in text files.
networking : yes
builddeps :
- ldc
- dub
- pkgconfig(xdiff)
- pkgconfig(wildmatch)
- pkgconfig(sqlite3)
setup : |
%apply_patches
build : |
dub build --build=release
install : |
install -Dm755 bin/dwatch -t ${installdir}/usr/bin
# Ссылка на сервис демона
ln -sf dwatch ${installdir}/usr/bin/dwatchd
install -Dm644 $pkgfiles/config.template.json -t ${installdir}/etc/dwatchd
install -Dm644 $pkgfiles/dwatchd.service -t ${installdir}/usr/lib/systemd/system
install -Dm00644 $pkgfiles/dwatch.tmpfiles $installdir/%libdir%/tmpfiles.d/dwatch.conf