summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał 'rysiek' Woźniak <rysiek@hackerspace.pl>2017-02-23 17:41:26 +0100
committerMichał 'rysiek' Woźniak <rysiek@hackerspace.pl>2017-02-23 17:41:26 +0100
commit0de32ba9371545bca6e3f42c394eb6cd4bf587ba (patch)
tree02566669509b2d655c9dfdf4d70c87e6ee533ed6
parent01762c996edf8dc16224eb9c1fab5ed2b5b7bef6 (diff)
downloadkuvert-0de32ba9371545bca6e3f42c394eb6cd4bf587ba.tar.gz
kuvert-0de32ba9371545bca6e3f42c394eb6cd4bf587ba.tar.bz2
kuvert-0de32ba9371545bca6e3f42c394eb6cd4bf587ba.zip
gpg support in run.sh bugfix
-rw-r--r--run.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/run.sh b/run.sh
index d581109..70109d4 100644
--- a/run.sh
+++ b/run.sh
@@ -160,7 +160,8 @@ echo "+-- changing user to: $KUVERT_USER"
# let's check up on the keyring,
# creating it if needed
echo -ne "+-- keys in keyring: "
-gpg --list-keys 2>/dev/null | wc -l
+# this has to be run as the target user
+su -p -c "env PATH=\"$PATH\" gpg --list-keys" "$KUVERT_USER" 2>/dev/null | wc -l
echo -e "+-- running:\n\t$*"
exec su -p -c "env PATH=\"$PATH\" $*" "$KUVERT_USER" \ No newline at end of file