aboutsummaryrefslogtreecommitdiff
path: root/_wui
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-19 01:41:31 +0700
committerShulhan <ms@kilabit.info>2023-11-19 20:55:38 +0700
commit67975b6392cb6045179d2e15e16befb985c606dd (patch)
treee1d35a1b4d32c712ff5eb1a5a913f46ccf07a287 /_wui
parente2f814496450a6e75b5dde9165253a93abf02b38 (diff)
downloadawwan-67975b6392cb6045179d2e15e16befb985c606dd.tar.xz
all: update share module
The latest share module, in lib/crypto, handle loading SSH private key with passphrase interactively using a program defined in SSH_ASKPASS. This allow "awwan serve" that run without stdin, for example under systemd service, works seamlessly by setting environment variable SSH_ASKPASS to /usr/lib/ssh/x11-ssh-askpass. Implements: https://todo.sr.ht/~shulhan/awwan/3 Signed-off-by: Shulhan <ms@kilabit.info>
Diffstat (limited to '_wui')
-rw-r--r--_wui/doc/awwan.adoc29
1 files changed, 23 insertions, 6 deletions
diff --git a/_wui/doc/awwan.adoc b/_wui/doc/awwan.adoc
index 4ac9a15..2f091ed 100644
--- a/_wui/doc/awwan.adoc
+++ b/_wui/doc/awwan.adoc
@@ -226,13 +226,11 @@ server known as "myserver",
$ awwan play myserver/script.aww 6,12-
----
-=== Command "serve"
+=== Command serve
-The "serve" command run the web-user interface using "<workspace>" directory
-as base directory.
-
-The "serve" command have only single argument: a "workspace".
-A "workspace" is the awwan root directory, the one that contains the
+The "serve" command run the web-user interface (WUI) using "<workspace>"
+directory as base directory.
+A "<workspace>" is the awwan root directory, the one that contains the
".ssh" directory.
Example of running the web-user interface using the "_example" directory in
@@ -244,6 +242,25 @@ $ awwan serve _example
--- Starting HTTP server at http://127.0.0.1:17600
----
+When executing "local" or "play" command with WUI, some statement may prompt
+for an input, for example a password for "sudo" or passphrase for private
+key.
+We can switch back to terminal window and input the password/passphrase,
+but this will break the flow.
+In order to minimize switching back-and-forth, or when awwan run without
+stdin (for example under systemd service), we can set environment
+variable SUDO_ASKPASS for sudo or SSH_ASKPASS for ssh.
+
+The following example use "/usr/lib/ssh/x11-ssh-askpass" for both
+environments before running "awwan serve" to handle password/passphrase
+prompt interactively,
+
+----
+$ export SUDO_ASKPASS=/usr/lib/ssh/x11-ssh-askpass
+$ export SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass
+$ awwan serve _example
+----
+
== THE SCRIPT