diff --git a/scripts/upgrade b/scripts/upgrade index 5a48397..f52fd20 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,9 +25,13 @@ sudo cp ../conf/settings.json /etc/transmission-daemon/settings.json sudo service transmission-daemon reload # 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@
@@g" /usr/share/transmission/web/index.html +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@@@g" /usr/share/transmission/web/index.html +fi + + # Configure Nginx and reload sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf