mirror of
https://github.com/YunoHost-Apps/searx_ynh.git
synced 2024-09-03 20:16:30 +02:00
[fix] mess with final path
This commit is contained in:
parent
d6cec46fc2
commit
344c46e59a
2 changed files with 17 additions and 17 deletions
|
@ -44,13 +44,13 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Configuration Searx
|
#Configuration Searx
|
||||||
sudo cp ../conf/settings.yml /opt/searx/searx/
|
sudo cp ../conf/settings.yml /opt/yunohost/searx/searx/
|
||||||
sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/searx/searx/settings.yml
|
sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/yunohost/searx/searx/settings.yml
|
||||||
if [ "$path" != "/" ];
|
if [ "$path" != "/" ];
|
||||||
then
|
then
|
||||||
sudo sed -i -e "s@ynhbaseurl@https://$domain$path/@g" /opt/searx/searx/settings.yml
|
sudo sed -i -e "s@ynhbaseurl@https://$domain$path/@g" /opt/yunohost/searx/searx/settings.yml
|
||||||
else
|
else
|
||||||
sudo sed -i -e "s@ynhbaseurl@https://$domain$path@g" /opt/searx/searx/settings.yml
|
sudo sed -i -e "s@ynhbaseurl@https://$domain$path@g" /opt/yunohost/searx/searx/settings.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set permissions to searx directory
|
# Set permissions to searx directory
|
||||||
|
|
|
@ -22,13 +22,13 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Init virtualenv
|
# Init virtualenv
|
||||||
if [ ! -d /opt/searx ];
|
if [ ! -d /opt/yunohost/searx ];
|
||||||
then
|
then
|
||||||
sudo mkdir /opt/searx
|
sudo mkdir /opt/yunohost/searx
|
||||||
fi
|
fi
|
||||||
sudo cp -r ../sources/* /opt/searx
|
sudo cp -r ../sources/* /opt/yunohost/searx
|
||||||
sudo virtualenv /opt/searx
|
sudo virtualenv /opt/yunohost/searx
|
||||||
sudo bash -c "source /opt/searx/bin/activate && pip install -r /opt/searx/requirements.txt"
|
sudo bash -c "source /opt/yunohost/searx/bin/activate && pip install -r /opt/yunohost/searx/requirements.txt"
|
||||||
|
|
||||||
# Disable swapfile
|
# Disable swapfile
|
||||||
if [ -f $tmp_swap_file ];
|
if [ -f $tmp_swap_file ];
|
||||||
|
@ -44,18 +44,18 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Configuration Searx
|
#Configuration Searx
|
||||||
sudo cp ../conf/settings.yml /opt/searx/searx/
|
sudo cp ../conf/settings.yml /opt/yunohost/searx/searx/
|
||||||
sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/searx/searx/settings.yml
|
sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/yunohost/searx/searx/settings.yml
|
||||||
if [ "$path" != "/" ];
|
if [ "$path" != "/" ];
|
||||||
then
|
then
|
||||||
sudo sed -i -e "s@ynhbaseurl@https://$domain$path/@g" /opt/searx/searx/settings.yml
|
sudo sed -i -e "s@ynhbaseurl@https://$domain$path/@g" /opt/yunohost/searx/searx/settings.yml
|
||||||
else
|
else
|
||||||
sudo sed -i -e "s@ynhbaseurl@https://$domain$path@g" /opt/searx/searx/settings.yml
|
sudo sed -i -e "s@ynhbaseurl@https://$domain$path@g" /opt/yunohost/searx/searx/settings.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set permissions to searx directory
|
# Set permissions to searx directory
|
||||||
sudo useradd searx -d /opt/searx
|
sudo useradd searx -d /opt/yunohost/searx
|
||||||
sudo chown searx:searx -R /opt/searx
|
sudo chown searx:searx -R /opt/yunohost/searx
|
||||||
|
|
||||||
# Copy uwsgi config
|
# Copy uwsgi config
|
||||||
sudo cp ../conf/searx.ini /etc/uwsgi/apps-available/
|
sudo cp ../conf/searx.ini /etc/uwsgi/apps-available/
|
||||||
|
@ -71,8 +71,8 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fix permission
|
# Fix permission
|
||||||
#sudo find /opt/searx/ -type d -exec chmod 2755 {} \;
|
#sudo find /opt/yunohost/searx/ -type d -exec chmod 2755 {} \;
|
||||||
#sudo find /opt/searx/ -type f -exec chmod g+r,o+r {} \;
|
#sudo find /opt/yunohost/searx/ -type f -exec chmod g+r,o+r {} \;
|
||||||
|
|
||||||
## Reload Nginx and regenerate SSOwat conf
|
## Reload Nginx and regenerate SSOwat conf
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
|
|
Loading…
Add table
Reference in a new issue