summaryrefslogtreecommitdiffhomepage
path: root/debian
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2022-11-26 12:59:28 +0100
committerRoland Reichwein <mail@reichwein.it>2022-11-26 12:59:28 +0100
commit7619dc0bef58d00c816b6628e457a85845b9edee (patch)
treef572b4dd639e0b4b4c0215e1cb1facb299ca0523 /debian
parentf116c9146e53d885840ed957204d60d81fd858bd (diff)
Cleanup via cron/systemd
Diffstat (limited to 'debian')
-rw-r--r--debian/README.Debian7
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules6
-rw-r--r--debian/whiteboard.conf3
-rw-r--r--debian/whiteboard.dirs (renamed from debian/dirs)0
-rw-r--r--debian/whiteboard.install1
-rw-r--r--debian/whiteboard.whiteboard-cleanup.service10
-rw-r--r--debian/whiteboard.whiteboard-cleanup.timer10
-rw-r--r--debian/whiteboard.whiteboard.service (renamed from debian/whiteboard.service)0
9 files changed, 34 insertions, 5 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
index f3f2434..07ab4d6 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -3,6 +3,10 @@ whiteboard for Debian
This package is the Debian version of whiteboard.
+It is an FCGI application communicating to a webserver, e.g. Reichwein.IT webserver.
+
+Via cron or systemd, whiteboard data in /var/lib/whiteboard is cleaned up once a day.
+Data location and maximum data age can be configured via /etc/whiteboard.conf.
Configuration
-------------
@@ -18,6 +22,9 @@ Configuration
<target>127.0.0.1:9014</target>
</path>
+* Edit /etc/whiteboard.conf to adjust the whiteboard data path if different
+ from /var/lib/whiteboard
+
* Enable:
# systemctl enable whiteboard.service
diff --git a/debian/control b/debian/control
index dc159fa..62b6e4c 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Homepage: http://www.reichwein.it/whiteboard/
Package: whiteboard
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, spawn-fcgi
+Depends: ${shlibs:Depends}, ${misc:Depends}, spawn-fcgi, libxml2-utils
Recommends: webserver
Homepage: http://www.reichwein.it/whiteboard/
Description: Web application for an collaborative editor
diff --git a/debian/rules b/debian/rules
index 9f52133..2ee2604 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,3 +6,9 @@
override_dh_fixperms:
dh_fixperms
chmod a+rwx debian/whiteboard/var/lib/whiteboard
+
+
+override_dh_auto_install:
+ dh_auto_install
+ dh_installsystemd --name whiteboard
+ dh_installsystemd --name whiteboard-cleanup
diff --git a/debian/whiteboard.conf b/debian/whiteboard.conf
deleted file mode 100644
index 91a868a..0000000
--- a/debian/whiteboard.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-<whiteboard>
- <datapath>/var/lib/whiteboard</datapath>
-<whiteboard>
diff --git a/debian/dirs b/debian/whiteboard.dirs
index 7b03c85..7b03c85 100644
--- a/debian/dirs
+++ b/debian/whiteboard.dirs
diff --git a/debian/whiteboard.install b/debian/whiteboard.install
deleted file mode 100644
index fa446b2..0000000
--- a/debian/whiteboard.install
+++ /dev/null
@@ -1 +0,0 @@
-debian/whiteboard.conf etc
diff --git a/debian/whiteboard.whiteboard-cleanup.service b/debian/whiteboard.whiteboard-cleanup.service
new file mode 100644
index 0000000..339c143
--- /dev/null
+++ b/debian/whiteboard.whiteboard-cleanup.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Cleanup whiteboard data
+Wants=whiteboard-cleanup.timer
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/whiteboard-cleanup
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/whiteboard.whiteboard-cleanup.timer b/debian/whiteboard.whiteboard-cleanup.timer
new file mode 100644
index 0000000..e2c93f9
--- /dev/null
+++ b/debian/whiteboard.whiteboard-cleanup.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Clean up whiteboard data
+Requires=whiteboard-cleanup.service
+
+[Timer]
+Unit=whiteboard-cleanup.service
+OnCalendar=*-*-* 00:00:00
+
+[Install]
+WantedBy=timers.target
diff --git a/debian/whiteboard.service b/debian/whiteboard.whiteboard.service
index c60f3f0..c60f3f0 100644
--- a/debian/whiteboard.service
+++ b/debian/whiteboard.whiteboard.service