summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/pcilib.in9
-rw-r--r--misc/pcilib_api.service.in15
-rw-r--r--misc/pcilib_html.service.in14
3 files changed, 38 insertions, 0 deletions
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