From cc4ef6d42b0b644a8c19bd7265278690fc41f3bc Mon Sep 17 00:00:00 2001 From: Jocelyn Delande Date: Sat, 2 May 2015 12:47:52 +0200 Subject: [PATCH] Re-ordered install script --- scripts/install | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index 1991546..43a5958 100644 --- a/scripts/install +++ b/scripts/install @@ -44,36 +44,37 @@ sudo chown -R www-data:www-data /opt/yunohost/ihatemoney/src/budget/static sudo install -o ihatemoney -g ihatemoney -m 755 \ -d /var/log/ihatemoney /etc/ihatemoney /var/run/ihatemoney/ -# Configure supervisor -sudo install -o root -g root -m 644 \ - ../conf/supervisord.conf /etc/supervisor/conf.d/ihatemoney.conf -sudo service supervisor restart -sudo yunohost service add supervisor - # Configure gunicorn sudo install -o ihatemoney -g ihatemoney -m 644 \ ../conf/gunicorn.conf.py /etc/ihatemoney/gunicorn.conf.py +# Configure supervisor +sudo install -o root -g root -m 644 \ + ../conf/supervisord.conf /etc/supervisor/conf.d/ihatemoney.conf +sudo yunohost service add supervisor + # Configure database db_pwd=`sudo yunohost app initdb $db_user` sudo yunohost app setting ihatemoney mysqlpwd -v $db_pwd # Configure ihatemoney -sed -i "s/MY_SECRET_KEY/$secret_key/" ../conf/settings.py +sed -i "s@MY_SECRET_KEY@$secret_key@" ../conf/settings.py sed -i "s/MY_EMAIL/$mails_sender/" ../conf/settings.py -sed -i "s/MY_MYSQL_PW/$db_pwd/" ../conf/settings.py +sed -i "s@MY_MYSQL_PW@$db_pwd@" ../conf/settings.py sed -i "s@MY_PATH@$path@" ../conf/settings.py sudo install -o ihatemoney -g ihatemoney -m 640 \ ../conf/settings.py /etc/ihatemoney/settings.py # The settings have to be stored here (on python path) sudo ln -s /etc/ihatemoney/settings.py /opt/yunohost/ihatemoney/src/budget/settings.py -# Reconfigure sso -sudo yunohost app ssowatconf - # Configure Nginx and reload sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf sudo install -o root -g root -m644 \ ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ihatemoney.conf sudo service nginx reload -echo $? + +# Start backend +sudo service supervisor restart + +# Reconfigure sso +sudo yunohost app ssowatconf