summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-22 20:56:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-22 20:58:49 +0000
commit1192e2475a0cf5b02810694e48cd58eb1b396198 (patch)
tree8b3f79d999584cb377ce0fb375e3d7396f03e4d8
parentReleasing debian version 1.6.3-2. (diff)
downloadttyd-1192e2475a0cf5b02810694e48cd58eb1b396198.tar.xz
ttyd-1192e2475a0cf5b02810694e48cd58eb1b396198.zip
Adding /etc/default/ttyd to handle options used to start ttyd via systemd unit.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-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