Bob Mottram 9 년 전
부모
커밋
1cfe374210
1개의 변경된 파일31개의 추가작업 그리고 2개의 파일을 삭제
  1. 31
    2
      src/freedombone

+ 31
- 2
src/freedombone 파일 보기

9175
         return
9175
         return
9176
     fi
9176
     fi
9177
 
9177
 
9178
+    apt-get -y install python-pip libyaml-dev python-werkzeug python-babel
9179
+    apt-get -y install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev uwsgi uwsgi-plugin-python libapache2-mod-uwsgi
9180
+
9181
+    pip install certifi
9182
+    if [ ! "$?" = "0" ]; then
9183
+        exit 737692
9184
+    fi
9185
+
9186
+    pip install pyyaml
9187
+    if [ ! "$?" = "0" ]; then
9188
+        exit 469242
9189
+    fi
9190
+
9191
+    pip install flask --upgrade
9192
+    if [ ! "$?" = "0" ]; then
9193
+        exit 888575
9194
+    fi
9195
+
9196
+    pip install flask_restless --upgrade
9197
+    if [ ! "$?" = "0" ]; then
9198
+        exit 54835
9199
+    fi
9200
+
9201
+    pip install flask_babel --upgrade
9202
+    if [ ! "$?" = "0" ]; then
9203
+        exit 63738
9204
+    fi
9205
+
9178
     if [ ! -d $SEARCH_ENGINE_PATH ]; then
9206
     if [ ! -d $SEARCH_ENGINE_PATH ]; then
9179
         mkdir -p $SEARCH_ENGINE_PATH
9207
         mkdir -p $SEARCH_ENGINE_PATH
9180
     fi
9208
     fi
9221
     echo 'server {' >> /etc/nginx/sites-available/searx
9249
     echo 'server {' >> /etc/nginx/sites-available/searx
9222
     echo "    listen 127.0.0.1:${SEARCH_ENGINE_ONION_PORT} default_server;" >> /etc/nginx/sites-available/searx
9250
     echo "    listen 127.0.0.1:${SEARCH_ENGINE_ONION_PORT} default_server;" >> /etc/nginx/sites-available/searx
9223
     echo "    root ${SEARCH_ENGINE_PATH}/searx;" >> /etc/nginx/sites-available/searx
9251
     echo "    root ${SEARCH_ENGINE_PATH}/searx;" >> /etc/nginx/sites-available/searx
9224
-    echo "    server_name searx;" >> /etc/nginx/sites-available/searx
9252
+    echo "    server_name ${SEARCH_ENGINE_ONION_HOSTNAME};" >> /etc/nginx/sites-available/searx
9225
     echo '    access_log off;' >> /etc/nginx/sites-available/searx
9253
     echo '    access_log off;' >> /etc/nginx/sites-available/searx
9226
     echo "    error_log /var/log/searx_error.log $WEBSERVER_LOG_LEVEL;" >> /etc/nginx/sites-available/searx
9254
     echo "    error_log /var/log/searx_error.log $WEBSERVER_LOG_LEVEL;" >> /etc/nginx/sites-available/searx
9227
     echo '' >> /etc/nginx/sites-available/searx
9255
     echo '' >> /etc/nginx/sites-available/searx
9258
     else
9286
     else
9259
         SEARCH_ENGINE_SECRET_KEY=$(cat $COMPLETION_FILE | grep "Search engine key" | awk -F ':' '{print $2}')
9287
         SEARCH_ENGINE_SECRET_KEY=$(cat $COMPLETION_FILE | grep "Search engine key" | awk -F ':' '{print $2}')
9260
     fi
9288
     fi
9261
-    sed -i "s|secret_key.*|secret_key : \"$SEARCH_ENGINE_SECRET_KEY\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
9289
+    sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
9290
+    sed -i "s|base_url.*|base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
9262
 
9291
 
9263
     chown -R searx:searx ${SEARCH_ENGINE_PATH}/searx
9292
     chown -R searx:searx ${SEARCH_ENGINE_PATH}/searx
9264
 
9293