From 4fc162b07b2e9d8489e16ed647e5d96f5c66e10a Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 20 Jan 2014 14:24:27 +0000 Subject: Add new Lorry Controller --- units/lighttpd-lorry-controller-webapp.service | 12 ++++++++++++ units/lorry-controller-ls-troves.service | 8 ++++++++ units/lorry-controller-ls-troves.timer | 6 ++++++ units/lorry-controller-minion@.service | 9 +++++++++ units/lorry-controller-readconf.service | 8 ++++++++ units/lorry-controller-readconf.timer | 6 ++++++ units/lorry-controller-status.service | 9 +++++++++ units/lorry-controller-status.timer | 6 ++++++ 8 files changed, 64 insertions(+) create mode 100644 units/lighttpd-lorry-controller-webapp.service create mode 100644 units/lorry-controller-ls-troves.service create mode 100644 units/lorry-controller-ls-troves.timer create mode 100644 units/lorry-controller-minion@.service create mode 100644 units/lorry-controller-readconf.service create mode 100644 units/lorry-controller-readconf.timer create mode 100644 units/lorry-controller-status.service create mode 100644 units/lorry-controller-status.timer (limited to 'units') 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 -- cgit v1.2.1