From 267ccc21f7b52d22bc3d5b9cd6239857b9a82aad Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rault Date: Thu, 15 Dec 2016 21:33:40 +0100 Subject: [PATCH] modified conf scripts --- scripts/install | 6 ++++++ scripts/upgrade | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 2deb310..3132dd4 100644 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,10 @@ then sudo swapon $tmp_swap_file fi + +# Modify assets to take path into account +sudo find ../sources/syncserver/page/sync_files/ -type f -exec sed -i -e "s@media\/img@$path\/media\/img@g" {} \; + # Copy files to the right place final_path=/opt/yunohost/ffsync sudo mkdir -p $final_path @@ -70,6 +74,8 @@ 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 +sudo sed -i -e "s@media\/img@$path\/media\/img@g" $final_path/syncserver/page/sync_files/firefox_sync-bundle.css +sudo sed -i -e "s@media\/img@$path\/media\/img@g" $final_path/syncserver/page/sync_files/responsive-bundle.css # Init virtualenv cd $final_path && sudo make build && sudo ./local/bin/easy_install gunicorn diff --git a/scripts/upgrade b/scripts/upgrade index f2a4a27..3a39026 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,9 +36,6 @@ then sudo swapon $tmp_swap_file fi -# Modify assets to take path into account -sudo find ../sources/syncserver/page/sync_files/ -type f -exec sed -i -e "s@media\/img@$path\/media\/img@g" {} \; - # Copy files to the right place sudo mkdir -p $final_path sudo cp -a ../sources/* $final_path @@ -60,6 +57,8 @@ 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 +sudo sed -i -e "s@media\/img@$path\/media\/img@g" $final_path/syncserver/page/sync_files/firefox_sync-bundle.css +sudo sed -i -e "s@media\/img@$path\/media\/img@g" $final_path/syncserver/page/sync_files/responsive-bundle.css # stop service before upgrade sudo service ffsync stop