mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Re-ordered install script
This commit is contained in:
parent
551d7db1d8
commit
cc4ef6d42b
1 changed files with 13 additions and 12 deletions
|
@ -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 \
|
sudo install -o ihatemoney -g ihatemoney -m 755 \
|
||||||
-d /var/log/ihatemoney /etc/ihatemoney /var/run/ihatemoney/
|
-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
|
# Configure gunicorn
|
||||||
sudo install -o ihatemoney -g ihatemoney -m 644 \
|
sudo install -o ihatemoney -g ihatemoney -m 644 \
|
||||||
../conf/gunicorn.conf.py /etc/ihatemoney/gunicorn.conf.py
|
../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
|
# Configure database
|
||||||
db_pwd=`sudo yunohost app initdb $db_user`
|
db_pwd=`sudo yunohost app initdb $db_user`
|
||||||
sudo yunohost app setting ihatemoney mysqlpwd -v $db_pwd
|
sudo yunohost app setting ihatemoney mysqlpwd -v $db_pwd
|
||||||
|
|
||||||
# Configure ihatemoney
|
# 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_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
|
sed -i "s@MY_PATH@$path@" ../conf/settings.py
|
||||||
sudo install -o ihatemoney -g ihatemoney -m 640 \
|
sudo install -o ihatemoney -g ihatemoney -m 640 \
|
||||||
../conf/settings.py /etc/ihatemoney/settings.py
|
../conf/settings.py /etc/ihatemoney/settings.py
|
||||||
# The settings have to be stored here (on python path)
|
# The settings have to be stored here (on python path)
|
||||||
sudo ln -s /etc/ihatemoney/settings.py /opt/yunohost/ihatemoney/src/budget/settings.py
|
sudo ln -s /etc/ihatemoney/settings.py /opt/yunohost/ihatemoney/src/budget/settings.py
|
||||||
|
|
||||||
# Reconfigure sso
|
|
||||||
sudo yunohost app ssowatconf
|
|
||||||
|
|
||||||
# Configure Nginx and reload
|
# Configure Nginx and reload
|
||||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||||
sudo install -o root -g root -m644 \
|
sudo install -o root -g root -m644 \
|
||||||
../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ihatemoney.conf
|
../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ihatemoney.conf
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
echo $?
|
|
||||||
|
# Start backend
|
||||||
|
sudo service supervisor restart
|
||||||
|
|
||||||
|
# Reconfigure sso
|
||||||
|
sudo yunohost app ssowatconf
|
||||||
|
|
Loading…
Add table
Reference in a new issue