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

YunoHost Multimedia

YunoHost Multimedia: /home/yunohost.transmission and completed ->
share/Torrents
This commit is contained in:
scith 2017-04-01 20:41:34 +02:00
parent 14fec9025c
commit 126d61d6e0
2 changed files with 18 additions and 0 deletions

View file

@ -46,6 +46,15 @@ sudo find /home/yunohost.transmission/ -type d | while read LINE; do sudo chmod
sudo find /home/yunohost.transmission/watched -type d | while read LINE; do sudo chmod 770 "$LINE" ; done
ynh_app_setting_set "$app" watchdir "/home/yunohost.transmission/watched"
# YunoHost multimedia
wget -qq https://github.com/YunoHost-Apps/yunohost.multimedia/archive/master.zip
unzip -qq master.zip
sudo ./yunohost.multimedia-master/script/ynh_media_build.sh
# Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move)
sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission" --dest="share/Torrents"
# And share completed directory
sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission/completed" --dest="share/Torrents"
# Create RPC password
rpcpassword=$(ynh_string_random)
ynh_app_setting_set "$app" rpcpassword "$rpcpassword"

View file

@ -36,6 +36,15 @@ if [ -z "$watchdir" ]; then
ynh_app_setting_set "$app" watchdir "/home/yunohost.transmission/watched"
fi
# YunoHost multimedia
wget -qq https://github.com/YunoHost-Apps/yunohost.multimedia/archive/master.zip
unzip -qq master.zip
sudo ./yunohost.multimedia-master/script/ynh_media_build.sh
# Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move)
sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission" --dest="share/Torrents"
# And share completed directory
sudo ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="/home/yunohost.transmission/completed" --dest="share/Torrents"
# Create RPC password if none exists
if [ -z "$rpcpassword" ]; then
rpcpassword=$(ynh_string_random)