From 327b71b05b60a03e56fad618b51fbccd06c3776d Mon Sep 17 00:00:00 2001 From: Vasilii Chernov Date: Fri, 4 Mar 2016 12:33:44 +0100 Subject: Add python servers instalation step. Add systemd config files generation for python servers. --- misc/pcilib.in | 9 +++++++++ misc/pcilib_api.service.in | 15 +++++++++++++++ misc/pcilib_html.service.in | 14 ++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 misc/pcilib.in create mode 100644 misc/pcilib_api.service.in create mode 100644 misc/pcilib_html.service.in (limited to 'misc') diff --git a/misc/pcilib.in b/misc/pcilib.in new file mode 100644 index 0000000..9b7352c --- /dev/null +++ b/misc/pcilib.in @@ -0,0 +1,9 @@ +# API server parameters +API_SERVER_DEVICE="/dev/fpga0" +API_SERVER_MODEL="test" + +# HTML server parameters +HTML_SERVER_PORT=5000 + +#Scripts directory +PCILIB_SCRIPTS_DIR="${PCILIB_PY_SERVER_INSTALL_DIR}/scripts" diff --git a/misc/pcilib_api.service.in b/misc/pcilib_api.service.in new file mode 100644 index 0000000..291a3e0 --- /dev/null +++ b/misc/pcilib_api.service.in @@ -0,0 +1,15 @@ +[Unit] +Description=Pcilib Python api server +Wants=network.target nss-lookup.target +After=network.target nss-lookup.target + +[Service] +Type=simple +EnvironmentFile=/etc/sysconfig/pcilib +ExecStart=${PYTHON_EXECUTABLE} ${PCILIB_PY_SERVER_INSTALL_DIR}/pcilib_api_server.py -d $API_SERVER_DEVICE -m $API_SERVER_MODEL + +[Install] +WantedBy=multi-user.target + + + diff --git a/misc/pcilib_html.service.in b/misc/pcilib_html.service.in new file mode 100644 index 0000000..634d9c7 --- /dev/null +++ b/misc/pcilib_html.service.in @@ -0,0 +1,14 @@ +[Unit] +Description=Pcilib Python html server +Wants=network.target nss-lookup.target +After=network.target nss-lookup.target +Requires=pcilib_api.service +After=pcilib_api.service + +[Service] +Type=simple +EnvironmentFile=/etc/sysconfig/pcilib +ExecStart=${PYTHON_EXECUTABLE} ${PCILIB_PY_SERVER_INSTALL_DIR}/pcilib_html_server.py -p $HTML_SERVER_PORT -e + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3