Update install

pull/3/head
abeudin 10 years ago
parent 885b500deb
commit c62ecd6b62

@ -21,7 +21,7 @@ sudo yunohost app initdb $db_user -p $db_pwd
sudo yunohost app setting ffsync mysqlpwd -v $db_pwd sudo yunohost app setting ffsync mysqlpwd -v $db_pwd
# Check depends installation # 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 # Check Swap
tmp_swap_file=/tmp/ffsync_swapfile tmp_swap_file=/tmp/ffsync_swapfile
@ -37,13 +37,6 @@ fi
final_path=/opt/yunohost/ffsync final_path=/opt/yunohost/ffsync
sudo mkdir -p $final_path sudo mkdir -p $final_path
sudo cp -a ../sources/* $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 # Set permissions to ffsync directory
sudo useradd ffsync -d $final_path 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/ sudo ln -s /etc/uwsgi/apps-available/ffsync.ini /etc/uwsgi/apps-enabled/
# Modify Nginx configuration file and copy it to Nginx conf directory # 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@PATHTOCHANGE@$path@g" ../conf/nginx.conf
sed -i "s@ALIASTOCHANGE@$final_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 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@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 # Init virtualenv
cd $final_path && sudo make build cd $final_path && sudo make build

Loading…
Cancel
Save