summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/local/default/ttyd8
-rw-r--r--debian/ttyd.README.Debian2
-rw-r--r--debian/ttyd.install1
-rw-r--r--debian/ttyd.service3
4 files changed, 12 insertions, 2 deletions
diff --git a/debian/local/default/ttyd b/debian/local/default/ttyd
new file mode 100644
index 0000000..a84ec9f
--- /dev/null
+++ b/debian/local/default/ttyd
@@ -0,0 +1,8 @@
+# /etc/default/ttyd
+
+INTERFACE="-i lo"
+PORT="-p 7681"
+CHECK_ORIGIN="-O"
+COMMAND="login"
+
+TTYD_OPTIONS="${INTERFACE} ${PORT} ${CHECK_ORIGIN} ${COMMAND}"
diff --git a/debian/ttyd.README.Debian b/debian/ttyd.README.Debian
index 8e8aaa0..9af0faa 100644
--- a/debian/ttyd.README.Debian
+++ b/debian/ttyd.README.Debian
@@ -11,7 +11,7 @@ ttyd for Debian
- Login mode means that the user gets a login prompt (like getty) where
user and password has to be entered.
- * See ttyd(1) manpage for the exact options.
+ * Edit /etc/default/ttyd and check the ttyd(1) manpage for the exact options.
-- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 21 Feb 2021 17:19:20 +0100
diff --git a/debian/ttyd.install b/debian/ttyd.install
new file mode 100644
index 0000000..70f696a
--- /dev/null
+++ b/debian/ttyd.install
@@ -0,0 +1 @@
+debian/local/default/* /etc/default
diff --git a/debian/ttyd.service b/debian/ttyd.service
index 4e05835..b09578e 100644
--- a/debian/ttyd.service
+++ b/debian/ttyd.service
@@ -5,7 +5,8 @@ After=network.target systemd-tmpfiles-clean.service
[Service]
Type=simple
-ExecStart=/usr/bin/ttyd -i lo -p 7681 -O login
+EnvironmentFile=-/etc/default/ttyd
+ExecStart=/usr/bin/ttyd $TTYD_OPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID
KillMode=process
LimitNOFILE=512