diff --git a/scripts/install b/scripts/install index cddc602..46628de 100644 --- a/scripts/install +++ b/scripts/install @@ -44,13 +44,13 @@ then fi #Configuration Searx -sudo cp ../conf/settings.yml /opt/searx/searx/ -sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/searx/searx/settings.yml +sudo cp ../conf/settings.yml /opt/yunohost/searx/searx/ +sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/yunohost/searx/searx/settings.yml if [ "$path" != "/" ]; 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 - 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 # Set permissions to searx directory diff --git a/scripts/upgrade b/scripts/upgrade index 0e1a825..eb6a04d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,13 +22,13 @@ then fi # Init virtualenv -if [ ! -d /opt/searx ]; +if [ ! -d /opt/yunohost/searx ]; then - sudo mkdir /opt/searx + sudo mkdir /opt/yunohost/searx fi -sudo cp -r ../sources/* /opt/searx -sudo virtualenv /opt/searx -sudo bash -c "source /opt/searx/bin/activate && pip install -r /opt/searx/requirements.txt" +sudo cp -r ../sources/* /opt/yunohost/searx +sudo virtualenv /opt/yunohost/searx +sudo bash -c "source /opt/yunohost/searx/bin/activate && pip install -r /opt/yunohost/searx/requirements.txt" # Disable swapfile if [ -f $tmp_swap_file ]; @@ -44,18 +44,18 @@ then fi #Configuration Searx -sudo cp ../conf/settings.yml /opt/searx/searx/ -sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/searx/searx/settings.yml +sudo cp ../conf/settings.yml /opt/yunohost/searx/searx/ +sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/yunohost/searx/searx/settings.yml if [ "$path" != "/" ]; 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 - 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 # Set permissions to searx directory -sudo useradd searx -d /opt/searx -sudo chown searx:searx -R /opt/searx +sudo useradd searx -d /opt/yunohost/searx +sudo chown searx:searx -R /opt/yunohost/searx # Copy uwsgi config sudo cp ../conf/searx.ini /etc/uwsgi/apps-available/ @@ -71,8 +71,8 @@ else fi # Fix permission -#sudo find /opt/searx/ -type d -exec chmod 2755 {} \; -#sudo find /opt/searx/ -type f -exec chmod g+r,o+r {} \; +#sudo find /opt/yunohost/searx/ -type d -exec chmod 2755 {} \; +#sudo find /opt/yunohost/searx/ -type f -exec chmod g+r,o+r {} \; ## Reload Nginx and regenerate SSOwat conf sudo service nginx reload