search daemon
This commit is contained in:
parent
6c176ddeaf
commit
763e207334
|
@ -9241,21 +9241,22 @@ function install_search_engine {
|
||||||
useradd -d ${SEARCH_ENGINE_PATH}/searx/ -s /bin/false searx
|
useradd -d ${SEARCH_ENGINE_PATH}/searx/ -s /bin/false searx
|
||||||
|
|
||||||
# daemon
|
# daemon
|
||||||
echo '[Unit]' > /etc/systemd/system/searx.service
|
echo '[Unit]' > /etc/systemd/system/searx.service
|
||||||
echo 'Description=Searx search engine' >> /etc/systemd/system/searx.service
|
echo 'Description=Searx (search engine)' >> /etc/systemd/system/searx.service
|
||||||
echo 'After=syslog.target' >> /etc/systemd/system/searx.service
|
echo 'After=syslog.target' >> /etc/systemd/system/searx.service
|
||||||
echo 'After=network.target' >> /etc/systemd/system/searx.service
|
echo 'After=network.target' >> /etc/systemd/system/searx.service
|
||||||
echo '[Service]' >> /etc/systemd/system/searx.service
|
echo '' >> /etc/systemd/system/searx.service
|
||||||
echo 'Type=simple' >> /etc/systemd/system/searx.service
|
echo '[Service]' >> /etc/systemd/system/searx.service
|
||||||
echo 'User=searx' >> /etc/systemd/system/searx.service
|
echo 'Type=simple' >> /etc/systemd/system/searx.service
|
||||||
echo 'Group=searx' >> /etc/systemd/system/searx.service
|
echo 'User=searx' >> /etc/systemd/system/searx.service
|
||||||
echo "WorkingDirectory=${SEARCH_ENGINE_PATH}/searx" >> /etc/systemd/system/searx.service
|
echo 'Group=searx' >> /etc/systemd/system/searx.service
|
||||||
echo 'ExecStart=/usr/bin/torify /usr/bin/python /etc/searx/searx/webapp.py' >> /etc/systemd/system/searx.service
|
echo "WorkingDirectory=${SEARCH_ENGINE_PATH}/searx" >> /etc/systemd/system/searx.service
|
||||||
echo '' >> /etc/systemd/system/searx.service
|
echo "ExecStart=/usr/bin/python ${SEARCH_ENGINE_PATH}/searx/searx/webapp.py" >> /etc/systemd/system/searx.service
|
||||||
echo 'TimeoutSec=300' >> /etc/systemd/system/searx.service
|
echo 'Restart=always' >> /etc/systemd/system/searx.service
|
||||||
echo '' >> /etc/systemd/system/searx.service
|
echo 'Environment="USER=searx"' >> /etc/systemd/system/searx.service
|
||||||
echo '[Install]' >> /etc/systemd/system/searx.service
|
echo '' >> /etc/systemd/system/searx.service
|
||||||
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/searx.service
|
echo '[Install]' >> /etc/systemd/system/searx.service
|
||||||
|
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/searx.service
|
||||||
|
|
||||||
# create a webserver file
|
# create a webserver file
|
||||||
echo 'server {' >> /etc/nginx/sites-available/searx
|
echo 'server {' >> /etc/nginx/sites-available/searx
|
||||||
|
|
Loading…
Reference in New Issue