|
|
|
|
257
|
SEARCH_ENGINE_PATH=/etc
|
257
|
SEARCH_ENGINE_PATH=/etc
|
258
|
SEARCH_ENGINE_ONION_PORT=8094
|
258
|
SEARCH_ENGINE_ONION_PORT=8094
|
259
|
SEARCH_ENGINE_ONION_HOSTNAME=
|
259
|
SEARCH_ENGINE_ONION_HOSTNAME=
|
|
|
260
|
+SEARCH_ENGINE_LOGIN_TEXT=$"Search engine login"
|
260
|
|
261
|
|
261
|
GPG_KEYSERVER="hkp://keys.gnupg.net"
|
262
|
GPG_KEYSERVER="hkp://keys.gnupg.net"
|
262
|
|
263
|
|
|
|
|
|
6235
|
echo 'install_web_server' >> $COMPLETION_FILE
|
6236
|
echo 'install_web_server' >> $COMPLETION_FILE
|
6236
|
}
|
6237
|
}
|
6237
|
|
6238
|
|
|
|
6239
|
+function install_web_server_access_control {
|
|
|
6240
|
+ if [ ! -f /etc/pam.d/nginx ]; then
|
|
|
6241
|
+ echo '#%PAM-1.0' > /etc/pam.d/nginx
|
|
|
6242
|
+ echo '@include common-auth' >> /etc/pam.d/nginx
|
|
|
6243
|
+ echo '@include common-account' >> /etc/pam.d/nginx
|
|
|
6244
|
+ echo '@include common-session' >> /etc/pam.d/nginx
|
|
|
6245
|
+ fi
|
|
|
6246
|
+}
|
|
|
6247
|
+
|
6238
|
function configure_php {
|
6248
|
function configure_php {
|
6239
|
sed -i "s/memory_limit = 128M/memory_limit = ${MAX_PHP_MEMORY}M/g" /etc/php5/fpm/php.ini
|
6249
|
sed -i "s/memory_limit = 128M/memory_limit = ${MAX_PHP_MEMORY}M/g" /etc/php5/fpm/php.ini
|
6240
|
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php5/fpm/php.ini
|
6250
|
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php5/fpm/php.ini
|
|
|
|
|
9160
|
}
|
9170
|
}
|
9161
|
|
9171
|
|
9162
|
function install_search_engine {
|
9172
|
function install_search_engine {
|
9163
|
- # Note: having a search engine is a nice idea, but at present there are a couple
|
|
|
9164
|
- # of problems. One is that there is no access control, such that J random web surfer
|
|
|
9165
|
- # could use your search engine. Secondly, the outgoing connection to other search
|
|
|
9166
|
- # engines currently can't be socks5 proxied. This potentially causes legal liability
|
|
|
9167
|
- # issues for the user - (i) providing secondard services beyond household members
|
|
|
9168
|
- # and (ii) adversaries could try to incriminate you by searching for things illegal
|
|
|
9169
|
- # within your zone.
|
|
|
9170
|
- # Until these factors are addressed it's unwise to have this enabled by default.
|
|
|
|
|
9173
|
+ # Note: currently socks5 outgoing proxies to other search engines does not work
|
9171
|
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
9174
|
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
9172
|
return
|
9175
|
return
|
9173
|
fi
|
9176
|
fi
|
|
|
|
|
9293
|
echo ' proxy_set_header X-Remote-Port $remote_port;' >> /etc/nginx/sites-available/searx
|
9296
|
echo ' proxy_set_header X-Remote-Port $remote_port;' >> /etc/nginx/sites-available/searx
|
9294
|
echo ' proxy_set_header X-Forwarded-Proto $scheme;' >> /etc/nginx/sites-available/searx
|
9297
|
echo ' proxy_set_header X-Forwarded-Proto $scheme;' >> /etc/nginx/sites-available/searx
|
9295
|
echo ' proxy_redirect off;' >> /etc/nginx/sites-available/searx
|
9298
|
echo ' proxy_redirect off;' >> /etc/nginx/sites-available/searx
|
|
|
9299
|
+ echo " auth_pam \"${SEARCH_ENGINE_LOGIN_TEXT}\";" >> /etc/nginx/sites-available/searx
|
|
|
9300
|
+ echo ' auth_pam_service_name "nginx";' >> /etc/nginx/sites-available/searx
|
9296
|
echo ' }' >> /etc/nginx/sites-available/searx
|
9301
|
echo ' }' >> /etc/nginx/sites-available/searx
|
9297
|
echo '' >> /etc/nginx/sites-available/searx
|
9302
|
echo '' >> /etc/nginx/sites-available/searx
|
9298
|
echo ' fastcgi_buffers 64 4K;' >> /etc/nginx/sites-available/searx
|
9303
|
echo ' fastcgi_buffers 64 4K;' >> /etc/nginx/sites-available/searx
|
|
|
|
|
10680
|
import_email
|
10685
|
import_email
|
10681
|
script_for_attaching_usb_drive
|
10686
|
script_for_attaching_usb_drive
|
10682
|
install_web_server
|
10687
|
install_web_server
|
|
|
10688
|
+install_web_server_access_control
|
10683
|
configure_firewall_for_web_server
|
10689
|
configure_firewall_for_web_server
|
10684
|
install_owncloud
|
10690
|
install_owncloud
|
10685
|
install_owncloud_music_app
|
10691
|
install_owncloud_music_app
|