Handle multiple gpg keys
This commit is contained in:
parent
13d0998a8a
commit
2dabe2e92f
|
@ -208,7 +208,7 @@ function add_user_xmpp {
|
||||||
if [ ! -d /home/$new_username/.config/profanity ]; then
|
if [ ! -d /home/$new_username/.config/profanity ]; then
|
||||||
mkdir -p /home/$new_username/.config/profanity
|
mkdir -p /home/$new_username/.config/profanity
|
||||||
fi
|
fi
|
||||||
GPG_PUBLIC_KEY_ID=$(su -c "gpg --list-keys $new_username@$HOSTNAME | grep 'pub '" - $new_username | awk -F ' ' '{print $2}' | awk -F '/' '{print $2}')
|
GPG_PUBLIC_KEY_ID=$(su -c "gpg --list-keys $new_username@$HOSTNAME | grep 'pub '" - $new_username | head -n 1 | awk -F ' ' '{print $2}' | awk -F '/' '{print $2}')
|
||||||
echo "[${new_username}@${HOSTNAME}]" > $XMPP_CLIENT_ACCOUNTS
|
echo "[${new_username}@${HOSTNAME}]" > $XMPP_CLIENT_ACCOUNTS
|
||||||
echo 'enabled=true' >> $XMPP_CLIENT_ACCOUNTS
|
echo 'enabled=true' >> $XMPP_CLIENT_ACCOUNTS
|
||||||
echo "jid=${new_username}@${HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
echo "jid=${new_username}@${HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||||
|
|
Loading…
Reference in New Issue