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:
parent
14fec9025c
commit
126d61d6e0
2 changed files with 18 additions and 0 deletions
|
@ -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
|
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"
|
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
|
# Create RPC password
|
||||||
rpcpassword=$(ynh_string_random)
|
rpcpassword=$(ynh_string_random)
|
||||||
ynh_app_setting_set "$app" rpcpassword "$rpcpassword"
|
ynh_app_setting_set "$app" rpcpassword "$rpcpassword"
|
||||||
|
|
|
@ -36,6 +36,15 @@ if [ -z "$watchdir" ]; then
|
||||||
ynh_app_setting_set "$app" watchdir "/home/yunohost.transmission/watched"
|
ynh_app_setting_set "$app" watchdir "/home/yunohost.transmission/watched"
|
||||||
fi
|
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
|
# Create RPC password if none exists
|
||||||
if [ -z "$rpcpassword" ]; then
|
if [ -z "$rpcpassword" ]; then
|
||||||
rpcpassword=$(ynh_string_random)
|
rpcpassword=$(ynh_string_random)
|
||||||
|
|
Loading…
Reference in a new issue