Browse Source

Fix invite script

Bob Mottram 7 years ago
parent
commit
a7f23f4a5f
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/freedombone-mesh-invite

+ 2
- 1
src/freedombone-mesh-invite View File

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