Fix invite script

This commit is contained in:
Bob Mottram 2017-10-05 22:50:57 +01:00
parent fc69415506
commit a7f23f4a5f
1 changed files with 2 additions and 1 deletions

View File

@ -31,11 +31,12 @@ PROJECT_NAME='freedombone'
export TEXTDOMAIN=${PROJECT_NAME}-mesh-invite
export TEXTDOMAINDIR="/usr/share/locale"
invite=$(su -c 'sbot invite.create 1' - scuttlebot | awk -F '"' '{print $2}')
invite=$(sudo -- bash -c 'su -c "sbot invite.create 1" - scuttlebot' | awk -F '"' '{print $2}')
if [ ${#invite} -lt 10 ]; then
dialog --title $"Create Invite" \
--msgbox $"\nThe invite could not be created" 7 70
exit 1
fi
echo "$invite" | xclip -selection c