Permalink
Browse files

Package does not include binaries any more. Transmission packages are…

… used from Debian instead

Enhancement:
- Creating and mount storage volume if not already exist
- Adding entry for storage volume to /etc/fstab
- Create softlinks into storage volume for preconfigured folders
  downloads and incomplete
- Do not make snapshots of volume storage
- Send info message to Kodi if Kodi is running
  • Loading branch information...
mkreisl committed Jun 14, 2017
1 parent 6c3576a commit 634c9fc3d7d7414ca9d1a120e9883fd4fe3b64ae
Showing with 283 additions and 9,970 deletions.
  1. +2 −2 README.md
  2. +2 −0 content-tpl/DEBIAN/conffiles
  3. +12 −0 content-tpl/DEBIAN/control
  4. 0 {content → content-tpl}/DEBIAN/debian-binary
  5. +98 −0 content-tpl/DEBIAN/postinst
  6. +2 −2 {content → content-tpl}/DEBIAN/postrm
  7. +25 −0 content-tpl/DEBIAN/preinst
  8. +19 −0 content-tpl/DEBIAN/prerm
  9. +0 −2 content/DEBIAN/conffiles
  10. +0 −10 content/DEBIAN/control
  11. +0 −73 content/DEBIAN/md5sums
  12. +0 −32 content/DEBIAN/postinst
  13. +0 −19 content/DEBIAN/preinst
  14. +0 −10 content/DEBIAN/prerm
  15. +0 −5 content/etc/default/transmission
  16. +20 −0 content/etc/default/transmission-daemon
  17. +0 −167 content/etc/init.d/transmission
  18. +30 −0 content/etc/init/transmission-daemon.conf
  19. +1 −0 content/etc/transmission-daemon/settings.json
  20. +8 −0 content/home/xbian/transmission/README.json
  21. +1 −1 content/{etc → home/xbian}/transmission/settings.json
  22. BIN content/usr/local/bin/transmission-cli
  23. BIN content/usr/local/bin/transmission-create
  24. BIN content/usr/local/bin/transmission-daemon
  25. BIN content/usr/local/bin/transmission-edit
  26. BIN content/usr/local/bin/transmission-remote
  27. BIN content/usr/local/bin/transmission-show
  28. +63 −0 content/usr/local/share/kodi/addons/plugin.xbianconfig/categories/extra/01_transmission.py
  29. +0 −127 content/usr/local/share/man/man1/transmission-cli.1
  30. +0 −52 content/usr/local/share/man/man1/transmission-create.1
  31. +0 −169 content/usr/local/share/man/man1/transmission-daemon.1
  32. +0 −47 content/usr/local/share/man/man1/transmission-edit.1
  33. +0 −407 content/usr/local/share/man/man1/transmission-remote.1
  34. +0 −39 content/usr/local/share/man/man1/transmission-show.1
  35. +0 −339 content/usr/local/share/transmission/web/LICENSE
  36. BIN content/usr/local/share/transmission/web/images/favicon.ico
  37. BIN content/usr/local/share/transmission/web/images/favicon.png
  38. BIN content/usr/local/share/transmission/web/images/webclip-icon.png
  39. +0 −422 content/usr/local/share/transmission/web/index.html
  40. +0 −306 content/usr/local/share/transmission/web/javascript/common.js
  41. +0 −115 content/usr/local/share/transmission/web/javascript/dialog.js
  42. +0 −194 content/usr/local/share/transmission/web/javascript/file-row.js
  43. +0 −313 content/usr/local/share/transmission/web/javascript/formatter.js
  44. +0 −816 content/usr/local/share/transmission/web/javascript/inspector.js
  45. +0 −1 content/usr/local/share/transmission/web/javascript/jquery/jquery.contextmenu.min.js
  46. +0 −4 content/usr/local/share/transmission/web/javascript/jquery/jquery.min.js
  47. +0 −1 content/usr/local/share/transmission/web/javascript/jquery/jquery.transmenu.min.js
  48. +0 −414 content/usr/local/share/transmission/web/javascript/jquery/jqueryui-1.8.16.min.js
  49. +0 −1 content/usr/local/share/transmission/web/javascript/jquery/json2.min.js
  50. +0 −42 content/usr/local/share/transmission/web/javascript/notifications.js
  51. +0 −318 content/usr/local/share/transmission/web/javascript/prefs-dialog.js
  52. +0 −256 content/usr/local/share/transmission/web/javascript/remote.js
  53. +0 −406 content/usr/local/share/transmission/web/javascript/torrent-row.js
  54. +0 −509 content/usr/local/share/transmission/web/javascript/torrent.js
  55. +0 −1,668 content/usr/local/share/transmission/web/javascript/transmission.js
  56. BIN content/usr/local/share/transmission/web/style/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png
  57. BIN content/usr/local/share/transmission/web/style/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png
  58. BIN content/usr/local/share/transmission/web/style/jqueryui/images/ui-bg_glass_75_dadada_1x400.png
  59. BIN content/usr/local/share/transmission/web/style/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png
  60. BIN ...t/usr/local/share/transmission/web/style/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  61. BIN content/usr/local/share/transmission/web/style/jqueryui/images/ui-icons_222222_256x240.png
  62. BIN content/usr/local/share/transmission/web/style/jqueryui/images/ui-icons_454545_256x240.png
  63. +0 −566 content/usr/local/share/transmission/web/style/jqueryui/jqueryui-1.8.16.css
  64. +0 −1,166 content/usr/local/share/transmission/web/style/transmission/common.css
  65. BIN content/usr/local/share/transmission/web/style/transmission/images/arrow-down.png
  66. BIN content/usr/local/share/transmission/web/style/transmission/images/arrow-up.png
  67. BIN content/usr/local/share/transmission/web/style/transmission/images/blue-turtle.png
  68. BIN content/usr/local/share/transmission/web/style/transmission/images/buttons/torrent_buttons.png
  69. BIN content/usr/local/share/transmission/web/style/transmission/images/compact.png
  70. BIN content/usr/local/share/transmission/web/style/transmission/images/file-priority-high.png
  71. BIN content/usr/local/share/transmission/web/style/transmission/images/file-priority-low.png
  72. BIN content/usr/local/share/transmission/web/style/transmission/images/file-priority-normal.png
  73. BIN content/usr/local/share/transmission/web/style/transmission/images/filter_bar.png
  74. BIN content/usr/local/share/transmission/web/style/transmission/images/filter_icon.png
  75. BIN content/usr/local/share/transmission/web/style/transmission/images/inspector-files.png
  76. BIN content/usr/local/share/transmission/web/style/transmission/images/inspector-info.png
  77. BIN content/usr/local/share/transmission/web/style/transmission/images/inspector-peers.png
  78. BIN content/usr/local/share/transmission/web/style/transmission/images/inspector-trackers.png
  79. BIN content/usr/local/share/transmission/web/style/transmission/images/lock_icon.png
  80. BIN content/usr/local/share/transmission/web/style/transmission/images/logo.png
  81. BIN content/usr/local/share/transmission/web/style/transmission/images/progress.png
  82. BIN content/usr/local/share/transmission/web/style/transmission/images/settings.png
  83. BIN content/usr/local/share/transmission/web/style/transmission/images/toolbar-close.png
  84. BIN content/usr/local/share/transmission/web/style/transmission/images/toolbar-folder.png
  85. BIN content/usr/local/share/transmission/web/style/transmission/images/toolbar-info.png
  86. BIN content/usr/local/share/transmission/web/style/transmission/images/toolbar-pause-all.png
  87. BIN content/usr/local/share/transmission/web/style/transmission/images/toolbar-pause.png
  88. BIN content/usr/local/share/transmission/web/style/transmission/images/toolbar-start-all.png
  89. BIN content/usr/local/share/transmission/web/style/transmission/images/toolbar-start.png
  90. BIN content/usr/local/share/transmission/web/style/transmission/images/turtle.png
  91. BIN content/usr/local/share/transmission/web/style/transmission/images/wrench.png
  92. +0 −949 content/usr/local/share/transmission/web/style/transmission/mobile.css
@@ -1,2 +1,2 @@
Transmission 2.82 for xbian
===========================
Transmission package for XBian (meta package)
=============================================
@@ -0,0 +1,2 @@
/home/xbian/transmission/settings.json
/etc/default/transmission-daemon
@@ -0,0 +1,12 @@
Origin: XBian
Package: xbian-package-transmission
Version: __DATE__
Section: net
Priority: optional
Architecture: armhf
Pre-Depends: transmission-daemon
Depends: transmission-cli, unrar, xbian-package-config-shell, xbian-package-xbianhome
Conflicts:
Replaces: transmission-daemon
Maintainer: mkreisl <mkreisl@xbian.org>
Description: Metapackage for Transmission, configured for XBian
@@ -0,0 +1,98 @@
#!/bin/bash

if [[ $1 == "configure" ]]; then

/etc/init.d/transmission-daemon stop &>/dev/null
stop transmission-daemon &>/dev/null

chmod 664 /etc/default/transmission-daemon
chgrp xbian /etc/default/transmission-daemon

update-rc.d transmission-daemon remove &>/dev/null

if ! btrfs-auto-snapshot listvol | grep -qw storage; then
btrfs-auto-snapshot createvol storage
if grep -q EXCLUDESUB /etc/default/xbian-snap; then
if ! grep -q EXCLUDESUB=.*storage /etc/default/xbian-snap; then
sed -i "s/EXCLUDESUB=/EXCLUDESUB=storage,/g" /etc/default/xbian-snap
sed -i 's/[, \t]*$//' /etc/default/xbian-snap
fi
else
echo EXCLUDESUB=storage >> /etc/default/xbian-snap
fi
mkdir -p /home/xbian/storage
chown -R xbian:xbian /home/xbian/storage
fi

if ! grep -qw /home/xbian/storage /etc/fstab; then
echo "# --- Added by xbian-package-transmission, modify only if you know what you're doing ---" >> /etc/fstab
echo "/dev/root /home/xbian/storage xbian subvol=storage/@,noatime,rw 0 0" >> /etc/fstab
fi

mountpoint -q /home/xbian/storage || mount /home/xbian/storage &>/dev/null

if [ ! -d /home/xbian/downloads ]; then
if pgrep "xbmc.bin|kodi.bin" >/dev/null; then
MSGPATHV='/run/splash'
HOSTNAME=$(hostname)
su -c "echo -e \"Transmission\nTransmission's WebGUI is accessable under address\nhttp://localhost:9091 or http://$HOSTNAME:9091\nusername: xbian, password raspberry\n\$\" >> $MSGPATHV/msg4kodi" xbian || :
else
echo "************************************************"
echo "*** Transmission ***"
echo "*** You can access WebGUI under ***"
echo "*** http://localhost:9091, user xbian, ***"
echo "*** password raspberry ***"
echo "************************************************"
fi
fi

mkdir -p /home/xbian/storage/transmission/downloads
chattr +C /home/xbian/storage/transmission/downloads
if [ -d /home/xbian/downloads -a ! -h /home/xbian/downloads ]; then
echo "Moving Transmission's downloads folder to storage subvolume ... "
find /home/xbian/downloads/ -maxdepth 1 -mindepth 1 -exec mv -f {} /home/xbian/storage/transmission/downloads/ \; -exec rm -rf {} \;
rmdir /home/xbian/downloads
fi

mkdir -p /home/xbian/storage/transmission/incomplete
chattr +C /home/xbian/storage/transmission/incomplete
if [ -d /home/xbian/incomplete -a ! -h /home/xbian/incomplete ]; then
echo "Moving Transmission's incomplete folder to storage subvolume ... "
find /home/xbian/incomplete/ -maxdepth 1 -mindepth 1 -exec mv -f {} /home/xbian/storage/transmission/incomplete/ \; -exec rm -rf {} \;
rmdir /home/xbian/incomplete
fi

chown -R xbian:xbian /home/xbian/storage/transmission

[ -d /home/xbian/downloads ] || ln -s storage/transmission/downloads/ /home/xbian/downloads
chown -R xbian:xbian /home/xbian/downloads

[ -d /home/xbian/incomplete ] || ln -s storage/transmission/incomplete/ /home/xbian/incomplete
chown -R xbian:xbian /home/xbian/incomplete

mkdir -p /home/xbian/torrents
chown -R xbian:xbian /home/xbian/torrents

if [ -d /etc/transmission ]; then
cp -a /etc/transmission /home/xbian
rm -rf /etc/transmission
fi

if [ -e /etc/default/transmission ] && grep -q "ENABLED=0" /etc/default/transmission; then
sed -i "s/ENABLE_DAEMON=.*/ENABLE_DAEMON=0/g" /etc/default/transmission-daemon
fi
rm -f /etc/default/transmission

if [ ! -h /etc/transmission-daemon/settings.json ]; then
rm -f /etc/transmission-daemon/settings.json
ln -s ../../home/xbian/transmission/settings.json /etc/transmission-daemon/
fi

chown -R xbian:xbian /home/xbian/transmission

xbian-config services insert transmission-daemon &>/dev/null
xbian-config services start transmission-daemon &>/dev/null

fi

exit 0
@@ -13,9 +13,9 @@ if [ "$1" == "remove" ] || [ "$1" == "purge" ]; then
if [ "$1" == "purge" ]; then

rm -fr /etc/transmission
rm -fr /home/xbian/transmission
rm -f /etc/default/transmission
rm -f /etc/default/transmission-daemon
fi

true

fi
@@ -0,0 +1,25 @@
#!/bin/bash

if [ $1 == "install" -o $1 == "upgrade" ]; then

if [ -f "/etc/init.d/transmission" ]; then
/etc/init.d/transmission stop &>/dev/null
update-rc.d transmission remove &>/dev/null
fi

if [ -f "/etc/init.d/transmission-daemon" ]; then
/etc/init.d/transmission-daemon stop &>/dev/null
fi

stop transmission-daemon &>/dev/null

xbian-config services delete transmission &>/dev/null

if [ -d "/usr/local/etc/transmission/" ]; then
mv /usr/local/etc/transmission /home/xbian/
ln -s /home/xbian/transmission /usr/local/etc/transmission
fi

fi

exit 0
@@ -0,0 +1,19 @@
#!/bin/bash

if [ "$1" == "remove" ] || [ "$1" == "purge" ]; then

if [ -f "/etc/init.d/transmission" ]; then
/etc/init.d/transmission stop &>/dev/null;
fi

if [ -f "/etc/init.d/transmission-daemon" ]; then
/etc/init.d/transmission-daemon stop &>/dev/null;
fi

stop transmission-daemon &>/dev/null

xbian-config services delete transmission-daemon &>/dev/null

fi

exit 0

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,20 @@
# defaults for transmission-daemon
# sourced by /etc/init.d/transmission-daemon

# Change to 0 to disable daemon
ENABLE_DAEMON=1

# This directory stores some runtime information, like torrent files
# and links to the config file, which itself can be found in
# /etc/transmission-daemon/settings.json
CONFIG_DIR="/home/xbian/transmission"

# Default options for daemon, see transmission-daemon(1) for more options
OPTIONS="--config-dir $CONFIG_DIR"

# The name of the user that should run Transmission.
# It's RECOMENDED to run Transmission in it's own user
USER=xbian

# (optional) extra options to start-stop-daemon
START_STOP_OPTIONS="--iosched idle --nicelevel 10"
Oops, something went wrong.

0 comments on commit 634c9fc

Please sign in to comment.