|
@@ -9241,21 +9241,22 @@ function install_search_engine {
|
9241
|
9241
|
useradd -d ${SEARCH_ENGINE_PATH}/searx/ -s /bin/false searx
|
9242
|
9242
|
|
9243
|
9243
|
# daemon
|
9244
|
|
- echo '[Unit]' > /etc/systemd/system/searx.service
|
9245
|
|
- echo 'Description=Searx search engine' >> /etc/systemd/system/searx.service
|
9246
|
|
- echo 'After=syslog.target' >> /etc/systemd/system/searx.service
|
9247
|
|
- echo 'After=network.target' >> /etc/systemd/system/searx.service
|
9248
|
|
- echo '[Service]' >> /etc/systemd/system/searx.service
|
9249
|
|
- echo 'Type=simple' >> /etc/systemd/system/searx.service
|
9250
|
|
- echo 'User=searx' >> /etc/systemd/system/searx.service
|
9251
|
|
- echo 'Group=searx' >> /etc/systemd/system/searx.service
|
9252
|
|
- echo "WorkingDirectory=${SEARCH_ENGINE_PATH}/searx" >> /etc/systemd/system/searx.service
|
9253
|
|
- echo 'ExecStart=/usr/bin/torify /usr/bin/python /etc/searx/searx/webapp.py' >> /etc/systemd/system/searx.service
|
9254
|
|
- echo '' >> /etc/systemd/system/searx.service
|
9255
|
|
- echo 'TimeoutSec=300' >> /etc/systemd/system/searx.service
|
9256
|
|
- echo '' >> /etc/systemd/system/searx.service
|
9257
|
|
- echo '[Install]' >> /etc/systemd/system/searx.service
|
9258
|
|
- echo 'WantedBy=multi-user.target' >> /etc/systemd/system/searx.service
|
|
9244
|
+ echo '[Unit]' > /etc/systemd/system/searx.service
|
|
9245
|
+ echo 'Description=Searx (search engine)' >> /etc/systemd/system/searx.service
|
|
9246
|
+ echo 'After=syslog.target' >> /etc/systemd/system/searx.service
|
|
9247
|
+ echo 'After=network.target' >> /etc/systemd/system/searx.service
|
|
9248
|
+ echo '' >> /etc/systemd/system/searx.service
|
|
9249
|
+ echo '[Service]' >> /etc/systemd/system/searx.service
|
|
9250
|
+ echo 'Type=simple' >> /etc/systemd/system/searx.service
|
|
9251
|
+ echo 'User=searx' >> /etc/systemd/system/searx.service
|
|
9252
|
+ echo 'Group=searx' >> /etc/systemd/system/searx.service
|
|
9253
|
+ echo "WorkingDirectory=${SEARCH_ENGINE_PATH}/searx" >> /etc/systemd/system/searx.service
|
|
9254
|
+ echo "ExecStart=/usr/bin/python ${SEARCH_ENGINE_PATH}/searx/searx/webapp.py" >> /etc/systemd/system/searx.service
|
|
9255
|
+ echo 'Restart=always' >> /etc/systemd/system/searx.service
|
|
9256
|
+ echo 'Environment="USER=searx"' >> /etc/systemd/system/searx.service
|
|
9257
|
+ echo '' >> /etc/systemd/system/searx.service
|
|
9258
|
+ echo '[Install]' >> /etc/systemd/system/searx.service
|
|
9259
|
+ echo 'WantedBy=multi-user.target' >> /etc/systemd/system/searx.service
|
9259
|
9260
|
|
9260
|
9261
|
# create a webserver file
|
9261
|
9262
|
echo 'server {' >> /etc/nginx/sites-available/searx
|