diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-01-20 14:24:27 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-04-15 13:29:27 +0000 |
commit | 4fc162b07b2e9d8489e16ed647e5d96f5c66e10a (patch) | |
tree | ac2a2a5b86a5d789bd28b383851b28d7f293b928 /units | |
parent | 716ad28c18ac00c52797dc42c843569b1834fb88 (diff) | |
download | lorry-controller-4fc162b07b2e9d8489e16ed647e5d96f5c66e10a.tar.gz |
Add new Lorry Controller
Diffstat (limited to 'units')
-rw-r--r-- | units/lighttpd-lorry-controller-webapp.service | 12 | ||||
-rw-r--r-- | units/lorry-controller-ls-troves.service | 8 | ||||
-rw-r--r-- | units/lorry-controller-ls-troves.timer | 6 | ||||
-rw-r--r-- | units/lorry-controller-minion@.service | 9 | ||||
-rw-r--r-- | units/lorry-controller-readconf.service | 8 | ||||
-rw-r--r-- | units/lorry-controller-readconf.timer | 6 | ||||
-rw-r--r-- | units/lorry-controller-status.service | 9 | ||||
-rw-r--r-- | units/lorry-controller-status.timer | 6 |
8 files changed, 64 insertions, 0 deletions
diff --git a/units/lighttpd-lorry-controller-webapp.service b/units/lighttpd-lorry-controller-webapp.service new file mode 100644 index 0000000..0c04fac --- /dev/null +++ b/units/lighttpd-lorry-controller-webapp.service @@ -0,0 +1,12 @@ +[Unit] +Description=Lighttpd Web Server for Lorry Controller WEBAPP +After=network.target + +[Service] +PermissionsStartOnly=true +User=lorry +Group=lorry +ExecStartPre=/usr/bin/install -d -o lorry -g lorry /run/lighttpd-lorry +ExecStart=/usr/sbin/lighttpd -f /etc/lighttpd/lorry-controller-webapp-httpd.conf -D +ExecStopPost=/bin/rm -r /run/lighttpd-lorry +Restart=always diff --git a/units/lorry-controller-ls-troves.service b/units/lorry-controller-ls-troves.service new file mode 100644 index 0000000..fe97811 --- /dev/null +++ b/units/lorry-controller-ls-troves.service @@ -0,0 +1,8 @@ +[Unit] +Description=Lorry Controller ls-troves +After=lighttpd-lorry-controller-webapp.service + +[Service] +ExecStart=/usr/bin/curl -o /dev/null -X POST --data "" http://localhost:12765/1.0/ls-troves +User=lorry +Group=lorry diff --git a/units/lorry-controller-ls-troves.timer b/units/lorry-controller-ls-troves.timer new file mode 100644 index 0000000..dbd157d --- /dev/null +++ b/units/lorry-controller-ls-troves.timer @@ -0,0 +1,6 @@ +[Unit] +Description=Lorry Controller ls-troves +After=lighttpd-lorry-controller-webapp.service + +[Timer] +OnUnitInactiveSec=60 diff --git a/units/lorry-controller-minion@.service b/units/lorry-controller-minion@.service new file mode 100644 index 0000000..b63d996 --- /dev/null +++ b/units/lorry-controller-minion@.service @@ -0,0 +1,9 @@ +[Unit] +Description=Lorry Controller MINION %i +After=lighttpd-lorry-controller-webapp.service + +[Service] +ExecStart=/usr/bin/lorry-controller-minion --config /etc/lorry-controller/minion.conf +Restart=always +User=lorry +Group=lorry diff --git a/units/lorry-controller-readconf.service b/units/lorry-controller-readconf.service new file mode 100644 index 0000000..1f73b46 --- /dev/null +++ b/units/lorry-controller-readconf.service @@ -0,0 +1,8 @@ +[Unit] +Description=Lorry Controller read config at startup +After=lighttpd-lorry-controller-webapp.service + +[Service] +ExecStart=/usr/bin/curl -o /dev/null -X POST --data "" http://localhost:12765/1.0/read-configuration +User=lorry +Group=lorry diff --git a/units/lorry-controller-readconf.timer b/units/lorry-controller-readconf.timer new file mode 100644 index 0000000..7e4f04e --- /dev/null +++ b/units/lorry-controller-readconf.timer @@ -0,0 +1,6 @@ +[Unit] +Description=Lorry Controller read config at startup +After=lighttpd-lorry-controller-webapp.service + +[Timer] +OnUnitInactiveSec=60 diff --git a/units/lorry-controller-status.service b/units/lorry-controller-status.service new file mode 100644 index 0000000..381677b --- /dev/null +++ b/units/lorry-controller-status.service @@ -0,0 +1,9 @@ +[Unit] +Description=Lorry Controller Status update +After=lighttpd-lorry-controller-webapp.service + +[Service] +ExecStart=/usr/bin/curl -o /dev/null http://localhost:12765/1.0/status +Restart=no +User=lorry +Group=lorry diff --git a/units/lorry-controller-status.timer b/units/lorry-controller-status.timer new file mode 100644 index 0000000..1528b8c --- /dev/null +++ b/units/lorry-controller-status.timer @@ -0,0 +1,6 @@ +[Unit] +Description=Lorry Controller Status update +After=lighttpd-lorry-controller-webapp.service + +[Timer] +OnUnitInactiveSec=60 |