From c961e2592fe2de0dc24a846af0ace22d0f4cad9a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 30 Dec 2018 12:11:54 +0100 Subject: Add systemd unit file example --- README.md | 3 ++- examples/db-infoscreen.service | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 examples/db-infoscreen.service diff --git a/README.md b/README.md index 36945f6..522df87 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,8 @@ pass requests for db-infoscreen to the appropriate port. You can run the app using a Mojo::Server of your choice, e.g. **perl index.pl daemon -m production** (quick&dirty, does not respect all variables) -or **hypnotad** (recommended). +or **hypnotad** (recommended). A systemd unit example is provided in +`examples/db-infoscreen.service`. All code in this repository may be used under the terms of the BSD-2-Clause (db-infoscreen, see COPYING) and MIT (jquery, jqueryui, and marquee libraries; diff --git a/examples/db-infoscreen.service b/examples/db-infoscreen.service new file mode 100644 index 0000000..2ecc577 --- /dev/null +++ b/examples/db-infoscreen.service @@ -0,0 +1,23 @@ +[Unit] +Description=dbf.finalrewind.org +After=network.target + +[Service] +Type=simple +RemainAfterExit=yes +PIDFile=/tmp/db-fakedisplay.pid +ExecStart=/usr/bin/hypnotoad -f index.pl +ExecStop=/usr/bin/hypnotoad -s index.pl +ExecReload=/usr/bin/hypnotoad index.pl +User=db-fakedisplay +WorkingDirectory=/srv/www/db-fakedisplay +Environment=LANG=en_US.UTF-8 +Environment=DBFAKEDISPLAY_LISTEN=http://127.0.0.1:8092 +Environment=DBFAKEDISPLAY_WORKERS=4 +Environment=DBFAKEDISPLAY_STATS=/tmp/dbf-api-stats +Environment=DBFAKEDISPLAY_HAFAS_CACHE=/var/cache/dbf/hafas +Environment=DBFAKEDISPLAY_IRIS_CACHE=/var/cache/dbf/iris +Environment=DBFAKEDISPLAY_IRISRT_CACHE=/var/cache/dbf/iris-rt + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3