mirror of
https://github.com/YunoHost-Apps/ffsync_ynh.git
synced 2024-09-03 18:26:38 +02:00
Update install
This commit is contained in:
parent
885b500deb
commit
c62ecd6b62
1 changed files with 6 additions and 8 deletions
|
@ -21,7 +21,7 @@ sudo yunohost app initdb $db_user -p $db_pwd
|
|||
sudo yunohost app setting ffsync mysqlpwd -v $db_pwd
|
||||
|
||||
# Check depends installation
|
||||
sudo apt-get install python-dev git-core python-virtualenv uwsgi
|
||||
sudo apt-get install git-core make python-dev python-virtualenv uwsgi uwsgi-core uwsgi-plugin-python
|
||||
|
||||
# Check Swap
|
||||
tmp_swap_file=/tmp/ffsync_swapfile
|
||||
|
@ -37,13 +37,6 @@ fi
|
|||
final_path=/opt/yunohost/ffsync
|
||||
sudo mkdir -p $final_path
|
||||
sudo cp -a ../sources/* $final_path
|
||||
#sudo cp ../conf/settings.php $final_path/
|
||||
|
||||
# Change variables in FSyncMS configuration
|
||||
#sudo sed -i "s/yunouser/$db_user/g" $final_path/settings.php
|
||||
#sudo sed -i "s/yunopass/$db_pwd/g" $final_path/settings.php
|
||||
#sudo sed -i "s/yunobase/$db_user/g" $final_path/settings.php
|
||||
#sudo sed -i "s@URLFFSYNC@$domain$path@g" $final_path/settings.php
|
||||
|
||||
# Set permissions to ffsync directory
|
||||
sudo useradd ffsync -d $final_path
|
||||
|
@ -54,10 +47,15 @@ sudo cp ../conf/ffsync.ini /etc/uwsgi/apps-available/
|
|||
sudo ln -s /etc/uwsgi/apps-available/ffsync.ini /etc/uwsgi/apps-enabled/
|
||||
|
||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||
secret=$(head -c 20 /dev/urandom | sha1sum | cut -d " " -f1)
|
||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ffsync.conf
|
||||
sudo sed -i -e "s@ynhbaseurl@$domain$path@g" $final_path/syncserver.ini
|
||||
sudo sed -i -e "s@changesecret@$secret@g" $final_path/syncserver.ini
|
||||
sudo sed -i "s/yunouser/$db_user/g" $final_path/syncserver.ini
|
||||
sudo sed -i "s/yunopass/$db_pwd/g" $final_path/syncserver.ini
|
||||
sudo sed -i "s/yunobase/$db_user/g" $final_path/syncserver.ini
|
||||
|
||||
# Init virtualenv
|
||||
cd $final_path && sudo make build
|
||||
|
|
Loading…
Reference in a new issue