1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

Update restore

This commit is contained in:
ericgaspar 2023-04-02 17:20:36 +02:00
parent 94105c44df
commit 7cb3bf177d

View file

@ -54,24 +54,19 @@ ynh_restore_file --origin_path=/usr/share/transmission
ynh_secure_remove --file=/var/lib/transmission-daemon
ynh_restore_file --origin_path=/var/lib/transmission-daemon
#=================================================
# OPEN PORTS
#=================================================
ynh_script_progression --message="Configuring firewall..." --weight=13
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
ynh_exec_warn_less yunohost firewall allow Both $peer_port
#=================================================
# YUNOHOST MULTIMEDIA INTEGRATION
#=================================================
ynh_script_progression --message="Adding multimedia directories..." --weight=4
ynh_multimedia_build_main_dir
# Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move)
ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="share/Torrents"
# And share completed directory
ynh_multimedia_addfolder --source_dir="$data_dir/completed" --dest_dir="share/Torrents"
# Share also watched directory, to allow to use it easily
ynh_multimedia_addfolder --source_dir="$data_dir/watched" --dest_dir="share/Torrent to download"