summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-22 21:21:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-22 21:21:59 +0000
commit1b98429c9d654f02803f4bb5100a40e3b96662ef (patch)
treeb94c97749e57d4ebb914222e75050313fc4109df
parentAdding /etc/default/ttyd to handle options used to start ttyd via systemd unit. (diff)
downloadttyd-1b98429c9d654f02803f4bb5100a40e3b96662ef.tar.xz
ttyd-1b98429c9d654f02803f4bb5100a40e3b96662ef.zip
Adding debconf handling for /etc/default/ttyd. [WIP; FIXME]tmp-debconf
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-xdebian/ttyd.config25
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/ttyd.config b/debian/ttyd.config
new file mode 100755
index 0000000..974b9a1
--- /dev/null
+++ b/debian/ttyd.config
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+CONFFILE="/etc/default/ttyd"
+
+if [ -e "${CONFFILE}" ]
+then
+ . ${CONFFILE} || true
+
+ db_set ttyd/interface "${INTERFACE}"
+ db_set ttyd/port "${PORT}"
+ db_set ttyd/check-origin "${CHECK_ORIGIN}"
+ db_set ttyd/command "${COMMAND}"
+fi
+
+db_input low ttyd/interface || true
+db_input low ttyd/port || true
+db_input low ttyd/check-origin || true
+db_input low ttyd/command || true
+db_go
+
+db_stop