mirror of
https://github.com/YunoHost-Apps/mopidy_ynh.git
synced 2024-09-03 19:46:21 +02:00
[fix] install + nginx (need test)
This commit is contained in:
parent
864c5397bc
commit
470b01ce0f
4 changed files with 29 additions and 25 deletions
|
@ -1,10 +1,17 @@
|
|||
location __PATHTOCHANGE__ {
|
||||
|
||||
proxy_pass http://127.0.0.1:6680/mopidy;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
#--PRIVATE--# Include SSOWAT user panel.
|
||||
#--PRIVATE--include conf.d/yunohost_panel.conf.inc;
|
||||
proxy_pass http://127.0.0.1:6680/mopidy;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
}
|
||||
|
||||
location /musicbox_webclient {
|
||||
|
||||
proxy_pass http://127.0.0.1:6680/musicbox_webclient;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
}
|
||||
|
|
|
@ -82,13 +82,6 @@ REMOVE_FPM_CONF () { # Suppression de la configuration du pool php-fpm
|
|||
sudo service php5-fpm reload
|
||||
}
|
||||
|
||||
REMOVE_LOGROTATE_CONF () { # Suppression de la configuration de logrotate
|
||||
if [ -e "/etc/logrotate.d/$app" ]; then
|
||||
echo "Delete logrotate config"
|
||||
sudo rm "/etc/logrotate.d/$app"
|
||||
fi
|
||||
}
|
||||
|
||||
SECURE_REMOVE () { # Suppression de dossier avec vérification des variables
|
||||
chaine="$1" # L'argument doit être donné entre quotes simple '', pour éviter d'interpréter les variables.
|
||||
no_var=0
|
||||
|
@ -172,6 +165,7 @@ EOF
|
|||
cat ${app}-logrotate | sudo tee -a /etc/logrotate.d/$app > /dev/null # Append this config to the others for this app. If a config file already exist
|
||||
}
|
||||
|
||||
|
||||
# Remove the app's logrotate config.
|
||||
#
|
||||
# usage: ynh_remove_logrotate
|
||||
|
|
|
@ -113,6 +113,7 @@ sudo systemctl status mopidy
|
|||
|
||||
# Copy library.json
|
||||
sudo cp /root/.local/share/mopidy/local/library.json.gz /var/lib/mopidy/local/
|
||||
sudo chown $app:audio /var/lib/mopidy/local/library.json.gz
|
||||
|
||||
# Running Mopidy again
|
||||
sudo systemctl restart mopidy
|
||||
|
@ -131,6 +132,9 @@ sudo git clone https://github.com/pimusicbox/mopidy-musicbox-webclient
|
|||
pushd mopidy-musicbox-webclient
|
||||
sudo python setup.py install
|
||||
|
||||
# Go to script install directory
|
||||
pushd /var/cache/yunohost/from_file/scripts
|
||||
|
||||
# Access public for curl
|
||||
ynh_app_setting_set $app unprotected_uris "/"
|
||||
|
||||
|
|
|
@ -19,23 +19,22 @@ sudo apt-get remove --purge -y mopidy-spotify
|
|||
|
||||
# Delete stupid file
|
||||
# Normally a root directory is delete with install app
|
||||
if [ -d "/root/.config/$app" ]; then
|
||||
SECURE_REMOVE '/root/.config/$app'
|
||||
fi
|
||||
if [ -d "/root/.cache/$app" ]; then
|
||||
SECURE_REMOVE '/root/.cache/$app'
|
||||
fi
|
||||
if [ -d "/root/.local/share/$app" ]; then
|
||||
SECURE_REMOVE '/root/.local/share/$app'
|
||||
fi
|
||||
|
||||
SECURE_REMOVE '/root/.config/$app'
|
||||
SECURE_REMOVE '/root/.cache/$app'
|
||||
SECURE_REMOVE '/root/.local/share/$app'
|
||||
SECURE_REMOVE '/usr/local/bin/$app'
|
||||
SECURE_REMOVE '/usr/share/$app'
|
||||
SECURE_REMOVE '/var/lib/$app'
|
||||
SECURE_REMOVE '/etc/apt/sources.list.d/$app.list'
|
||||
SECURE_REMOVE '/opt/$app-musicbox-webclient'
|
||||
SECURE_REMOVE '/var/www/$app'
|
||||
sudo rm -fr '/usr/local/lib/python2.7/dist-packages/Mopidy_MusicBox_Webclient-2.3.0-py2.7.egg'
|
||||
SECURE_REMOVE '/var/log/$app'
|
||||
if [ -e "/usr/local/lib/python2.7/dist-packages/Mopidy_MusicBox_Webclient-2.3.0-py2.7.egg" ]; then
|
||||
sudo rm -fr '/usr/local/lib/python2.7/dist-packages/Mopidy_MusicBox_Webclient-2.3.0-py2.7.egg'
|
||||
fi
|
||||
if [ -e "/etc/apt/sources.list.d/mopidy.list" ]; then
|
||||
sudo rm -fr '/etc/apt/sources.list.d/mopidy.list'
|
||||
fi
|
||||
|
||||
REMOVE_NGINX_CONF # Suppression de la configuration nginx
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue