mirror of
https://github.com/YunoHost-Apps/transmission_ynh.git
synced 2024-09-04 01:46:12 +02:00
commit
3bcc75978a
4 changed files with 32 additions and 8 deletions
|
@ -43,6 +43,11 @@ sudo service transmission-daemon reload
|
||||||
# Monitor service
|
# Monitor service
|
||||||
sudo yunohost service add transmission-daemon
|
sudo yunohost service add transmission-daemon
|
||||||
|
|
||||||
|
# Patch sources to add a download button
|
||||||
|
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 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
|
||||||
|
|
||||||
# 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
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/transmission.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/transmission.conf
|
||||||
|
|
|
@ -24,6 +24,16 @@ sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json
|
||||||
sudo cp ../conf/settings.json /etc/transmission-daemon/settings.json
|
sudo cp ../conf/settings.json /etc/transmission-daemon/settings.json
|
||||||
sudo service transmission-daemon reload
|
sudo service transmission-daemon reload
|
||||||
|
|
||||||
|
# Patch sources to add a download button
|
||||||
|
if ! grep 'toolbar-downloads' /usr/share/transmission/web/index.html --quiet; then
|
||||||
|
|
||||||
|
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 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
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 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
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/transmission.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/transmission.conf
|
||||||
|
|
BIN
sources/toolbar-downloads.png
Normal file
BIN
sources/toolbar-downloads.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
9
sources/ynh_common.css
Normal file
9
sources/ynh_common.css
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
/* Inserted by Yunohost install script */
|
||||||
|
div#toolbar > * {
|
||||||
|
background-position: center center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
div#toolbar > #toolbar-downloads {
|
||||||
|
background-image: url("images/toolbar-downloads.png");
|
||||||
|
}
|
Loading…
Reference in a new issue