summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-04-22 13:56:14 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-04-23 15:36:42 +0000
commit5b475b38ddc3bb1e373110e81cd1d00d9dcfd246 (patch)
tree489da2fdd61f21ab392301b85dd829b0da77d8bd
parent2831109ad7398fd5d7a86559b4ba3eb3a85ebb8e (diff)
downloadtrove-setup-5b475b38ddc3bb1e373110e81cd1d00d9dcfd246.tar.gz
Add unit for modifying lorry crontab
-rw-r--r--units/drop-lorry-controller-cronjob.service13
1 files changed, 13 insertions, 0 deletions
diff --git a/units/drop-lorry-controller-cronjob.service b/units/drop-lorry-controller-cronjob.service
new file mode 100644
index 0000000..8cad21f
--- /dev/null
+++ b/units/drop-lorry-controller-cronjob.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Drop lorry-controller from lorry's crontab
+After=basic.target
+ConditionPathExists=!/etc/lorry-controller/lorry-controller-removed-from-crontab
+
+[Service]
+Type=oneshot
+Restart=no
+ExecStart=/usr/libexec/remove-lorry-controller-from-lorry-crontab
+ExecStartPost=/bin/touch /etc/lorry-controller/lorry-controller-removed-from-crontab
+User=lorry
+Group=lorry
+PermissionsStartOnly=true