1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tvheadend_ynh.git synced 2024-10-01 13:34:50 +02:00

Use /var/lib/tvheadend as a data_dir

This commit is contained in:
Félix Piédallu 2024-03-08 13:17:17 +01:00
parent b0bc592385
commit e852fa2e8b
3 changed files with 21 additions and 0 deletions

View file

@ -79,6 +79,11 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
[resources.install_dir]
[resources.data_dir]
dir = "/var/lib/tvheadend"
owner = "hts"
group = "video"
[resources.permissions]
main.url = "/"
main.auth_header = false

View file

@ -21,6 +21,13 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE DATA DIR
#=================================================
### Only relevant if there is a "data_dir" resource for this app
ynh_backup --src_path="$data_dir" --is_big
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================

View file

@ -19,6 +19,15 @@ ynh_restore_file --origin_path="$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$data_dir" --not_mandatory
chown -R "hts:video" "$data_dir"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================