diff options
-rw-r--r-- | mkosi.extra/etc/systemd/system/kanboard.service | 8 | ||||
-rw-r--r-- | mkosi.extra/etc/systemd/system/kanboard.timer | 10 | ||||
-rwxr-xr-x | mkosi.postinst | 4 |
3 files changed, 22 insertions, 0 deletions
diff --git a/mkosi.extra/etc/systemd/system/kanboard.service b/mkosi.extra/etc/systemd/system/kanboard.service new file mode 100644 index 0000000..33e528c --- /dev/null +++ b/mkosi.extra/etc/systemd/system/kanboard.service @@ -0,0 +1,8 @@ +[Unit] +Description=Run kanboard's cron job + +[Service] +Type=oneshot +User=www-data +WorkingDirectory=/var/www/kanboard +ExecStart=/var/www/kanboard/cli cronjob diff --git a/mkosi.extra/etc/systemd/system/kanboard.timer b/mkosi.extra/etc/systemd/system/kanboard.timer new file mode 100644 index 0000000..852e800 --- /dev/null +++ b/mkosi.extra/etc/systemd/system/kanboard.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Daily execution of kanboard's cronjob + +[Timer] +OnCalendar=daily +RandomizedDelaySec=6h +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/mkosi.postinst b/mkosi.postinst index 34bdbd2..e882836 100755 --- a/mkosi.postinst +++ b/mkosi.postinst @@ -14,6 +14,7 @@ locale-gen # get kanboard url='https://github.com/kanboard/kanboard/archive/v1.2.12.tar.gz' +# extract and install kanboard TMP=$(mktemp -d) cd $TMP wget "${url}" @@ -25,7 +26,10 @@ chown -R www-data: /var/www/kanboard rm -r /var/www/kanboard/data rm -r /var/www/kanboard/plugins +# enable kanboards cron-service +systemctl enable kanboard.timer +# fix apache-config a2dissite 000-default.conf a2enmod rewrite a2ensite kanboard.conf |