From d25dd29b659b7a81d08198ff28e9b252ba620414 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Wed, 4 Sep 2019 15:05:10 +0200 Subject: [PATCH] Add pwenv utility --- bin/pwenv | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bin/pwenv diff --git a/bin/pwenv b/bin/pwenv new file mode 100755 index 0000000..408e09d --- /dev/null +++ b/bin/pwenv @@ -0,0 +1,7 @@ +#!/bin/bash +set -eu + +var="$1" +shift + +exec env ${var}=$(systemd-ask-password --accept-cached --keyname="pwenv.${var}" "${var}: ") "$@"