From 6315e15d54d03ad48d2ae83d5730f46b700e608b Mon Sep 17 00:00:00 2001 From: magikcypress Date: Wed, 8 Mar 2017 17:21:17 +0100 Subject: [PATCH] Ajout le service mopidy dans l'administration --- README.md | 8 ++++++-- scripts/install | 11 +++++++---- scripts/restore | 4 ++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6c4c581..d5d82c3 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Il se peut que vous n'ayez pas de son, je vous invite à vous renseigner sur [la ### Pour les bidouilleurs +Vous pouvez arrêter le service depuis la page "Services" dans l'interface d'administration de YunoHost. + Les fichiers de configuration se trouve dans le répertoire /usr/share/mopidy/conf.d *Les lignes de commandes relative à Mopidy* @@ -50,7 +52,7 @@ Activer ou désactiver Mopidy `$ sudo systemctl disable mopidy` Si vous ajoutez de nouveaux fichiers dans le répertoire local, rescanner votre répertoire. -`$ sudo mopidy local scan` +`$ mopidy local scan` ## Why Mopidy? @@ -82,6 +84,8 @@ You may have no sound, check [Mopidy's documentation] (https://docs.mopidy.com/e ### For hackers +You can stop the service from the "Services" page in the YunoHost administration interface. + The configuration files can be found in the directory /usr/share/mopidy/conf.d *Commandline for Mopidy* @@ -97,7 +101,7 @@ Enable or disable Mopidy `$ sudo systemctl disable mopidy` If you add new files to the local directory, rescan your directory. -`$ sudo mopidy local scan` +`$ mopidy local scan` ## Versionning diff --git a/scripts/install b/scripts/install index aeb15d9..2f32d9f 100644 --- a/scripts/install +++ b/scripts/install @@ -143,8 +143,11 @@ sudo yunohost firewall allow TCP 6680 # Access public for curl ynh_app_setting_set $app unprotected_uris "/" -# Reload SSOwat configuration -sudo yunohost app ssowatconf - # Reload Nginx and regenerate SSOwat conf -sudo service nginx reload \ No newline at end of file +sudo service nginx reload + +# Add Mopidy into YunoHost services +sudo yunohost service add mopidy --log "/var/log/mopidy/mopidy.log" + +# Reload SSOwat configuration +sudo yunohost app ssowatconf \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index d2b004f..8bf6148 100644 --- a/scripts/restore +++ b/scripts/restore @@ -38,4 +38,8 @@ sudo cp -a "${backup_dir}/var/lib/$app" "/var/lib/$app" # Set permissions sudo chown -R www-data: $final_path +# Restart service and add service into YunoHost +sudo service mopidy restart +sudo yunohost service add mopidy --log "/var/log/mopidy/mopidy.log" + sudo yunohost app ssowatconf