1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lidarr_ynh.git synced 2024-09-03 19:35:58 +02:00
This commit is contained in:
Éric Gaspar 2023-03-23 23:29:06 +01:00
parent 894a498346
commit 04be246a03
5 changed files with 11 additions and 42 deletions

View file

@ -1,24 +0,0 @@
;; Test complet
; Manifest
domain="domain.tld"
path="/path"
admin="john"
; Checks
pkg_linter=1
setup_sub_dir=1
setup_root=1
setup_nourl=0
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=cd2f91ab84cef8c143ee1f3f05c82691bce17726
backup_restore=1
multi_instance=1
change_url=1
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=CommitHash
name=2021-12-02 v0.8.1.2135
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&

View file

@ -19,7 +19,7 @@ code = "https://github.com/Lidarr/Lidarr"
yunohost = ">= 11.1.15" yunohost = ">= 11.1.15"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true
ldap = false ldap = false
sso = false sso = false
disk = "50M" disk = "50M"
ram.build = "50M" ram.build = "50M"
@ -56,7 +56,7 @@ ram.runtime = "50M"
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"
api.main.url = "/api" api.main.url = "/api"
api.allowed="visitors" api.allowed = "visitors"
api.show_tile = false api.show_tile = false
api.protected = true api.protected = true

View file

@ -31,11 +31,11 @@ ynh_change_url_nginx_config
# UPDATE CONFIGURATION FILE # UPDATE CONFIGURATION FILE
#================================================= #=================================================
ynh_add_config --template="../conf/config.xml" --destination="$data_path/config.xml" ynh_add_config --template="../conf/config.xml" --destination="$data_dir/config.xml"
chmod 750 "$data_path/config.xml" chmod 750 "$data_dir/config.xml"
chmod o-rwx "$data_path/config.xml" chmod o-rwx "$data_dir/config.xml"
chown $app "$data_path/config.xml" chown $app "$data_dir/config.xml"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION

View file

@ -19,6 +19,10 @@ ynh_setup_source --dest_dir="$install_dir"
mkdir -p "$data_dir/logs" mkdir -p "$data_dir/logs"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
@ -45,16 +49,7 @@ ynh_script_progression --message="Configuring Lidarr..." --weight=2
api_key=$(ynh_string_random --length=32) api_key=$(ynh_string_random --length=32)
ynh_app_setting_set --app=$app --key=api_key --value=$api_key ynh_app_setting_set --app=$app --key=api_key --value=$api_key
ynh_add_config --template="../conf/config.xml" --destination="$data_path/config.xml" ynh_add_config --template="../conf/config.xml" --destination="$data_dir/config.xml"
#=================================================
# SETUP FILE PERMISSIONS
#=================================================
ynh_script_progression --message="Setting files permissions and ownership..." --weight=1
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir"
chmod 400 "$data_dir/config.xml" chmod 400 "$data_dir/config.xml"
chown $app:$app "$data_dir/config.xml" chown $app:$app "$data_dir/config.xml"
@ -77,7 +72,6 @@ ynh_multimedia_addaccess $app
ynh_script_progression --message="Configuring log rotation..." --weight=1 ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s) # Use logrotate to manage application logfile(s)
ynh_use_logrotate
ynh_use_logrotate --logfile="$data_dir/logs" ynh_use_logrotate --logfile="$data_dir/logs"
#================================================= #=================================================

View file

@ -76,7 +76,6 @@ chown $app:$app "$data_dir/config.xml"
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage app-specific logfile(s) # Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
ynh_use_logrotate --non-append --logfile="$data_dir/logs" ynh_use_logrotate --non-append --logfile="$data_dir/logs"
#================================================= #=================================================