mirror of
https://github.com/YunoHost-Apps/lidarr_ynh.git
synced 2024-09-03 19:35:58 +02:00
commit
a289a2ddac
12 changed files with 104 additions and 33 deletions
|
@ -5,7 +5,8 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Lidarr for YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/lidarr.svg)](https://dash.yunohost.org/appci/app/lidarr) ![Working status](https://ci-apps.yunohost.org/ci/badges/lidarr.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/lidarr.maintain.svg)
|
||||
[![Integration level](https://dash.yunohost.org/integration/lidarr.svg)](https://dash.yunohost.org/appci/app/lidarr) ![Working status](https://ci-apps.yunohost.org/ci/badges/lidarr.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/lidarr.maintain.svg)
|
||||
|
||||
[![Install Lidarr with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lidarr)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
@ -17,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
Music collection manager for Usenet and BitTorrent users
|
||||
|
||||
**Shipped version:** 1.0.2.2592~ynh1
|
||||
**Shipped version:** 1.0.2.2592~ynh2
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
23
README_fr.md
23
README_fr.md
|
@ -5,23 +5,24 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Lidarr pour YunoHost
|
||||
|
||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/lidarr.svg)](https://dash.yunohost.org/appci/app/lidarr) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/lidarr.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/lidarr.maintain.svg)
|
||||
[![Niveau d’intégration](https://dash.yunohost.org/integration/lidarr.svg)](https://dash.yunohost.org/appci/app/lidarr) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/lidarr.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/lidarr.maintain.svg)
|
||||
|
||||
[![Installer Lidarr avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lidarr)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer Lidarr rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||
> *Ce package vous permet d’installer Lidarr rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.*
|
||||
|
||||
## Vue d'ensemble
|
||||
## Vue d’ensemble
|
||||
|
||||
Gestionnaire de discothèque pour utilisateurs de Usenet et BitTorrent
|
||||
|
||||
**Version incluse :** 1.0.2.2592~ynh1
|
||||
**Version incluse :** 1.0.2.2592~ynh2
|
||||
|
||||
## Captures d'écran
|
||||
## Captures d’écran
|
||||
|
||||
![Capture d'écran de Lidarr](./doc/screenshots/screenshot.jpg)
|
||||
![Capture d’écran de Lidarr](./doc/screenshots/screenshot.jpg)
|
||||
|
||||
## Avertissements / informations importantes
|
||||
|
||||
|
@ -32,9 +33,9 @@ Gestionnaire de discothèque pour utilisateurs de Usenet et BitTorrent
|
|||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : <https://lidarr.audio>
|
||||
* Documentation officielle de l'admin : <https://wiki.servarr.com/Lidarr>
|
||||
* Dépôt de code officiel de l'app : <https://github.com/Lidarr/Lidarr>
|
||||
* Site officiel de l’app : <https://lidarr.audio>
|
||||
* Documentation officielle de l’admin : <https://wiki.servarr.com/Lidarr>
|
||||
* Dépôt de code officiel de l’app : <https://github.com/Lidarr/Lidarr>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_lidarr>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/lidarr_ynh/issues>
|
||||
|
||||
|
@ -50,4 +51,4 @@ ou
|
|||
sudo yunohost app upgrade lidarr -u https://github.com/YunoHost-Apps/lidarr_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||
**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
|
|
@ -9,4 +9,4 @@
|
|||
<AuthenticationMethod>None</AuthenticationMethod>
|
||||
<UpdateMechanism>BuiltIn</UpdateMechanism>
|
||||
<Branch>main</Branch>
|
||||
</Config>
|
||||
</Config>
|
|
@ -9,7 +9,7 @@ location __PATH__ {
|
|||
proxy_no_cache $cookie_session;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
# Allow the Radarr API
|
||||
# Allow the Lidarr API
|
||||
location __PATH__/api {
|
||||
auth_request off;
|
||||
proxy_pass http://127.0.0.1:__PORT____PATH__/api;
|
||||
|
|
|
@ -7,7 +7,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
ExecStart=__FINALPATH__/Lidarr -nobrowser -data=__FINALPATH__/.data
|
||||
ExecStart=__FINALPATH__/Lidarr -nobrowser -data=__DATA_PATH__
|
||||
|
||||
TimeoutStopSec=20
|
||||
KillMode=process
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Music collection manager for Usenet and BitTorrent users",
|
||||
"fr": "Gestionnaire de discothèque pour utilisateurs de Usenet et BitTorrent"
|
||||
},
|
||||
"version": "1.0.2.2592~ynh1",
|
||||
"version": "1.0.2.2592~ynh2",
|
||||
"url": "https://lidarr.audio",
|
||||
"upstream": {
|
||||
"license": "GPL-3.0-only",
|
||||
|
|
|
@ -29,6 +29,7 @@ ynh_print_info --message="Loading installation settings..."
|
|||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
|
||||
#=================================================
|
||||
|
@ -42,6 +43,12 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$data_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -28,6 +28,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
|||
|
||||
# Needed for helper "ynh_add_nginx_config"
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
api_key=$(ynh_app_setting_get --app=$app --key=api_key)
|
||||
|
||||
|
@ -113,11 +114,11 @@ fi
|
|||
# UPDATE CONFIGURATION FILE
|
||||
#=================================================
|
||||
|
||||
ynh_add_config --template="../conf/config.xml" --destination="$final_path/.data/config.xml"
|
||||
ynh_add_config --template="../conf/config.xml" --destination="$data_path/config.xml"
|
||||
|
||||
chmod 750 "$final_path/.data/config.xml"
|
||||
chmod o-rwx "$final_path/.data/config.xml"
|
||||
chown $app "$final_path/.data/config.xml"
|
||||
chmod 750 "$data_path/config.xml"
|
||||
chmod o-rwx "$data_path/config.xml"
|
||||
chown $app "$data_path/config.xml"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
@ -126,7 +127,7 @@ chown $app "$final_path/.data/config.xml"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
|
@ -39,6 +39,9 @@ ynh_script_progression --message="Validating installation parameters..." --weigh
|
|||
final_path=/opt/yunohost/$app
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
data_path=/home/yunohost.app/$app
|
||||
test ! -e "$data_path" || ynh_die --message="Data directory ($data_path) already exists"
|
||||
|
||||
# Register (book) web path
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||
|
||||
|
@ -86,7 +89,8 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
||||
|
||||
mkdir -p "$final_path/.data/logs"
|
||||
ynh_app_setting_set --app=$app --key=data_path --value=$data_path
|
||||
mkdir -p "$data_path/logs"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -114,7 +118,7 @@ ynh_script_progression --message="Configuring Lidarr..." --weight=2
|
|||
api_key=$(ynh_string_random --length=32)
|
||||
ynh_app_setting_set --app=$app --key=api_key --value=$api_key
|
||||
|
||||
ynh_add_config --template="../conf/config.xml" --destination="$final_path/.data/config.xml"
|
||||
ynh_add_config --template="../conf/config.xml" --destination="$data_path/config.xml"
|
||||
|
||||
#=================================================
|
||||
# SETUP FILE PERMISSIONS
|
||||
|
@ -125,6 +129,13 @@ chmod 750 "$final_path"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app: "$final_path"
|
||||
|
||||
chmod 750 "$data_path"
|
||||
chmod -R o-rwx "$data_path"
|
||||
chown -R $app: "$data_path"
|
||||
|
||||
chmod 400 "$data_path/config.xml"
|
||||
chown $app:$app "$data_path/config.xml"
|
||||
|
||||
#=================================================
|
||||
# YUNOHOST MULTIMEDIA INTEGRATION
|
||||
#=================================================
|
||||
|
@ -144,14 +155,14 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1
|
|||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate
|
||||
ynh_use_logrotate --logfile="$final_path/.data/logs"
|
||||
ynh_use_logrotate --logfile="$data_path/logs"
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Lidarr daemon" --log="$final_path/.data/logs/lidarr.txt"
|
||||
yunohost service add $app --description="Lidarr daemon" --log="$data_path/logs/lidarr.txt"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
@ -159,7 +170,7 @@ yunohost service add $app --description="Lidarr daemon" --log="$final_path/.data
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
|
@ -19,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
|
@ -57,6 +58,14 @@ ynh_script_progression --message="Removing app main directory..." --weight=1
|
|||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP DATA DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing app data directory..." --weight=1
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$data_path"
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -31,6 +31,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -39,6 +40,9 @@ ynh_script_progression --message="Validating restoration parameters..." --weight
|
|||
|
||||
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
|
||||
test ! -d $data_path || ynh_die --message="There is already a directory: $data_path "
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
|
@ -67,6 +71,20 @@ chmod 750 "$final_path"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app: "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP DATA DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app data directory..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="$data_path"
|
||||
|
||||
chmod 750 "$data_path"
|
||||
chmod -R o-rwx "$data_path"
|
||||
chown -R $app: "$data_path"
|
||||
|
||||
chmod 400 "$data_path/config.xml"
|
||||
chown $app:$app "$data_path/config.xml"
|
||||
|
||||
#=================================================
|
||||
# YUNOHOST MULTIMEDIA INTEGRATION
|
||||
#=================================================
|
||||
|
@ -100,14 +118,14 @@ systemctl enable $app.service --quiet
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Lidarr daemon" --log="$final_path/.data/logs/lidarr.txt"
|
||||
yunohost service add $app --description="Lidarr daemon" --log="$data_path/logs/lidarr.txt"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE LOGROTATE CONFIGURATION
|
||||
|
|
|
@ -21,6 +21,8 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
|||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
||||
api_key=$(ynh_app_setting_get --app=$app --key=api_key)
|
||||
architecture=$YNH_ARCH
|
||||
|
||||
#=================================================
|
||||
|
@ -62,6 +64,13 @@ if ! ynh_permission_exists --permission="api"; then
|
|||
ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true"
|
||||
fi
|
||||
|
||||
# Move data directory if needed
|
||||
if [ -z "$data_path" ]; then
|
||||
data_path=/home/yunohost.app/$app
|
||||
ynh_app_setting_set --app=$app --key=data_path --value=$data_path
|
||||
mv "$final_path/.data" "/home/yunohost.app/$app"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -82,11 +91,15 @@ then
|
|||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
||||
fi
|
||||
|
||||
mkdir -p "$final_path/.data/logs"
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app: "$final_path"
|
||||
|
||||
mkdir -p "$data_path/logs"
|
||||
chmod 750 "$data_path"
|
||||
chmod -R o-rwx "$data_path"
|
||||
chown -R $app: "$data_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -112,6 +125,16 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating the configuration file.." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/config.xml" --destination="$data_path/config.xml"
|
||||
|
||||
chmod 400 "$data_path/config.xml"
|
||||
chown $app:$app "$data_path/config.xml"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
@ -121,21 +144,21 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight
|
|||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
ynh_use_logrotate --non-append --logfile="$final_path/.data/logs"
|
||||
ynh_use_logrotate --non-append --logfile="$data_path/logs"
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Lidarr daemon" --log="$final_path/.data/logs/lidarr.txt"
|
||||
yunohost service add $app --description="Lidarr daemon" --log="$data_path/logs/lidarr.txt"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Reference in a new issue