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

Merge pull request #12 from opi/master

Fix permission, target blank on link, human readable sizes
This commit is contained in:
Alexis Gavoty 2014-12-04 23:06:59 +01:00
commit a35fba9715
3 changed files with 11 additions and 9 deletions

View file

@ -11,6 +11,7 @@ location PATHTOCHANGE/ {
location PATHTOCHANGE/downloads { location PATHTOCHANGE/downloads {
alias /home/yunohost.transmission/completed/; alias /home/yunohost.transmission/completed/;
autoindex on; autoindex on;
autoindex_exact_size off;
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;

View file

@ -30,10 +30,10 @@ sudo apt-get install transmission-daemon -y -qq
# Make directories and set rights # Make directories and set rights
sudo mkdir -p /home/yunohost.transmission/{progress,completed} sudo mkdir -p /home/yunohost.transmission/{progress,completed}
sudo chgrp debian-transmission /home/yunohost.transmission/{progress,completed} sudo chown -R debian-transmission:www-data /home/yunohost.transmission/
sudo chmod 755 -R /home/yunohost.transmission sudo chown -R debian-transmission:debian-transmission /home/yunohost.transmission/progress
sudo chmod 770 -R /home/yunohost.transmission/{progress,completed} sudo find /home/yunohost.transmission/ -type f | while read LINE; do sudo chmod 640 "$LINE" ; done
sudo chown -R www-data /home/yunohost.transmission/completed sudo find /home/yunohost.transmission/ -type d | while read LINE; do sudo chmod 750 "$LINE" ; done
# Configure Transmission and reload # Configure Transmission and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json
@ -46,7 +46,7 @@ sudo yunohost service add transmission-daemon
# Patch sources to add a download button # Patch sources to add a download button
sudo cp ../sources/toolbar-downloads.png /usr/share/transmission/web/style/transmission/images/toolbar-downloads.png sudo cp ../sources/toolbar-downloads.png /usr/share/transmission/web/style/transmission/images/toolbar-downloads.png
sudo bash -c 'cat ../sources/ynh_common.css >> /usr/share/transmission/web/style/transmission/common.css' sudo bash -c 'cat ../sources/ynh_common.css >> /usr/share/transmission/web/style/transmission/common.css'
sudo sed -i "s@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div>@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div><div id=\"toolbar-separator\"></div><a href=\"../../downloads/\" id=\"toolbar-downloads\" title=\"Downloads\"></a>@g" /usr/share/transmission/web/index.html sudo sed -i "s@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div>@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div><div id=\"toolbar-separator\"></div><a href=\"../../downloads/\" id=\"toolbar-downloads\" title=\"Downloads\" target=\"_blank\"></a>@g" /usr/share/transmission/web/index.html
# Configure Nginx and reload # Configure Nginx and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf

View file

@ -15,9 +15,10 @@ sudo apt-get install transmission-daemon -y -qq
# Make directories and set rights # Make directories and set rights
sudo mkdir -p /home/yunohost.transmission/{progress,completed} sudo mkdir -p /home/yunohost.transmission/{progress,completed}
sudo chgrp debian-transmission /home/yunohost.transmission/{progress,completed} sudo chown -R debian-transmission:www-data /home/yunohost.transmission/
sudo chmod 755 -R /home/yunohost.transmission sudo chown -R debian-transmission:debian-transmission /home/yunohost.transmission/progress
sudo chmod 770 -R /home/yunohost.transmission/{progress,completed} sudo find /home/yunohost.transmission/ -type f | while read LINE; do sudo chmod 640 "$LINE" ; done
sudo find /home/yunohost.transmission/ -type d | while read LINE; do sudo chmod 750 "$LINE" ; done
# Configure Transmission and reload # Configure Transmission and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json
@ -29,7 +30,7 @@ if ! grep 'toolbar-downloads' /usr/share/transmission/web/index.html --quiet; th
sudo cp ../sources/toolbar-downloads.png /usr/share/transmission/web/style/transmission/images/toolbar-downloads.png sudo cp ../sources/toolbar-downloads.png /usr/share/transmission/web/style/transmission/images/toolbar-downloads.png
sudo bash -c 'cat ../sources/ynh_common.css >> /usr/share/transmission/web/style/transmission/common.css' sudo bash -c 'cat ../sources/ynh_common.css >> /usr/share/transmission/web/style/transmission/common.css'
sudo sed -i "s@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div>@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div><div id=\"toolbar-separator\"></div><a href=\"../../downloads/\" id=\"toolbar-downloads\" title=\"Downloads\"></a>@g" /usr/share/transmission/web/index.html sudo sed -i "s@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div>@<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div><div id=\"toolbar-separator\"></div><a href=\"../../downloads/\" id=\"toolbar-downloads\" title=\"Downloads\" target=\"_blank\"></a>@g" /usr/share/transmission/web/index.html
fi fi