浏览代码

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 7 年前
父节点
当前提交
c0d73e0169
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 7
    1
      src/freedombone-app-syncthing
  2. 1
    1
      src/freedombone-controlpanel

+ 7
- 1
src/freedombone-app-syncthing 查看文件

@@ -94,7 +94,13 @@ function syncthing_show_id {
94 94
     SYNCTHING_ID=$(cat ~/.syncthing-server-id)
95 95
     dialog --title $"Device ID for ${PROJECT_NAME}" \
96 96
            --backtitle $"Freedombone User Control Panel" \
97
-           --msgbox $"In a desktop terminal press shift and select the ID below,\nthen right click and copy.\n\nWithin Connectbot select Menu/Copy and then highlight the ID below\n\n$SYNCTHING_ID" 12 78
97
+           --msgbox $"In a desktop terminal press shift and select the ID below,\nthen right click and copy.\n\nWithin Connectbot select Menu/Copy and then highlight the ID below\n\n$SYNCTHING_ID\n\nAlternatively press Enter to display a QR code which can be scanned." 13 78
98
+    clear
99
+    echo $'Your Syncthing ID code'
100
+    echo ''
101
+    echo -n "$SYNCTHING_ID" | qrencode -t UTF8
102
+    echo ''
103
+    read -n1 -rsp $"Press any key to continue..." key
98 104
 }
99 105
 
100 106
 function syncthing_add_id {

+ 1
- 1
src/freedombone-controlpanel 查看文件

@@ -1312,7 +1312,7 @@ function show_tripwire_verification_code {
1312 1312
     echo $'Tripwire Verification Code'
1313 1313
     echo ''
1314 1314
     DBHASH=$(sha512sum  /var/lib/tripwire/${HOSTNAME}.twd)
1315
-    echo "$DBHASH" | qrencode -t UTF8
1315
+    echo -n "$DBHASH" | qrencode -t UTF8
1316 1316
     echo ''
1317 1317
     echo "$DBHASH"
1318 1318
     echo ''