瀏覽代碼

bower install

Bob Mottram 7 年之前
父節點
當前提交
1e7e023dd2
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      src/freedombone-app-cryptpad

+ 3
- 3
src/freedombone-app-cryptpad 查看文件

@@ -339,7 +339,7 @@ function install_cryptpad_main {
339 339
         echo '' >> $cryptpad_nginx_site
340 340
         echo '  index index.html;' >> $cryptpad_nginx_site
341 341
         echo '' >> $cryptpad_nginx_site
342
-        echo '  location = / {' >> $cryptpad_nginx_site
342
+        echo '  location = /cryptpad_websocket {' >> $cryptpad_nginx_site
343 343
         echo "    proxy_pass http://localhost:$CRYPTPAD_PORT;" >> $cryptpad_nginx_site
344 344
         echo '    proxy_set_header X-Real-IP $remote_addr;' >> $cryptpad_nginx_site
345 345
         echo '    proxy_set_header Host $host;' >> $cryptpad_nginx_site
@@ -390,7 +390,7 @@ function install_cryptpad_main {
390 390
     echo '' >> $cryptpad_nginx_site
391 391
     echo '  index index.html;' >> $cryptpad_nginx_site
392 392
     echo '' >> $cryptpad_nginx_site
393
-    echo '  location = / {' >> $cryptpad_nginx_site
393
+    echo '  location = /cryptpad_websocket {' >> $cryptpad_nginx_site
394 394
     echo "    proxy_pass http://localhost:$CRYPTPAD_PORT;" >> $cryptpad_nginx_site
395 395
     echo '    proxy_set_header X-Real-IP $remote_addr;' >> $cryptpad_nginx_site
396 396
     echo '    proxy_set_header Host $host;' >> $cryptpad_nginx_site
@@ -455,7 +455,7 @@ function install_cryptpad {
455 455
 
456 456
     npm install
457 457
     npm install -g bower@1.8.0
458
-    bower install
458
+    su -c 'bower install' - cryptpad
459 459
     cp config.example.js config.js
460 460
     if [ ! -f config.js ]; then
461 461
         echo $'Cryptpad config file not found'