summaryrefslogtreecommitdiff
path: root/scripts/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/systemd')
-rw-r--r--scripts/systemd/codeq10
-rw-r--r--scripts/systemd/codeq-prolog.service13
-rw-r--r--scripts/systemd/codeq-server.service15
-rw-r--r--scripts/systemd/codeq-web.service15
4 files changed, 53 insertions, 0 deletions
diff --git a/scripts/systemd/codeq b/scripts/systemd/codeq
new file mode 100644
index 0000000..83a4e6c
--- /dev/null
+++ b/scripts/systemd/codeq
@@ -0,0 +1,10 @@
+# /etc/default/codeq, common settings for CodeQ programs
+CODEQ_PROBLEMS=/var/local/codeq-problems
+CODEQ_WEB_OUTPUT=/var/www/html/data
+CODEQ_DB_HOST=localhost
+CODEQ_DB_DATABASE=codeq
+CODEQ_DB_USER=codeq
+CODEQ_DB_PASS=c0d3q
+CODEQ_SERVER_LOG=/var/log/codeq-server.log
+CODEQ_WEB_LOG=/var/log/codeq-web.log
+
diff --git a/scripts/systemd/codeq-prolog.service b/scripts/systemd/codeq-prolog.service
new file mode 100644
index 0000000..0c9abdb
--- /dev/null
+++ b/scripts/systemd/codeq-prolog.service
@@ -0,0 +1,13 @@
+# /etc/systemd/system/codeq-prolog.service
+[Unit]
+After=network.target
+Description=CodeQ Prolog daemon
+
+[Service]
+ExecStart=/usr/bin/swipl -q --nosignals -tty -s /var/local/codeq-server/prolog/runner/daemon.pl
+Restart=on-failure
+Type=simple
+StandardInput=null
+StandardOutput=null
+StandardError=null
+
diff --git a/scripts/systemd/codeq-server.service b/scripts/systemd/codeq-server.service
new file mode 100644
index 0000000..26e05f9
--- /dev/null
+++ b/scripts/systemd/codeq-server.service
@@ -0,0 +1,15 @@
+# /etc/systemd/system/codeq-server.service
+[Unit]
+Wants=postgresql.service codeq-prolog.service
+After=network.target postgresql.service codeq-prolog.service
+Description=CodeQ server
+
+[Service]
+ExecStart=/usr/bin/python3 /var/local/codeq-server/daemon.py
+Restart=on-failure
+Type=simple
+StandardInput=null
+StandardOutput=null
+StandardError=null
+EnvironmentFile=-/etc/default/codeq
+
diff --git a/scripts/systemd/codeq-web.service b/scripts/systemd/codeq-web.service
new file mode 100644
index 0000000..92d2076
--- /dev/null
+++ b/scripts/systemd/codeq-web.service
@@ -0,0 +1,15 @@
+# /etc/systemd/system/codeq-web.service
+[Unit]
+Wants=codeq-server.service
+After=network.target codeq-server.service
+Description=CodeQ web services
+
+[Service]
+ExecStart=/usr/bin/nodejs /var/local/codeq-server/web/main.js
+Restart=on-failure
+Type=simple
+StandardInput=null
+StandardOutput=null
+StandardError=null
+EnvironmentFile=-/etc/default/codeq
+