Skip to content

Commit 0f75a95

Browse files
caprielealberto.petrucciFrancYescO
authored
Transmission/Amule/Aria2 restart trigger (#1080)
* Updated transmission installation script to create hot reload file + fixed rpc_whitelist * little cleanup * Restart transmission only if there are no usb plugged * Restart transmission only if the attached usb has the sharing/transmission directory * Fixed wrong path Co-authored-by: alberto.petrucci <[email protected]> Co-authored-by: Francesco M <[email protected]>
1 parent 0dff36b commit 0f75a95

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

decompressed/gui_file/usr/share/transformer/scripts/appInstallRemoveUtility.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,17 @@ app_transmission() {
6161
opkg install transmission-web transmission-daemon-openssl
6262

6363
uci set transmission.@transmission[0].enabled=1
64-
uci set transmission.@transmission[0].rpc_whitelist='127.0.0.1,192.168.*'
64+
uci set transmission.@transmission[0].rpc_whitelist='127.0.0.1,192.168.*.*'
6565
uci commit
6666

67+
# Create script to trigger transmission restart when an usb is plugged in/out
68+
{
69+
echo '#!/bin/sh'
70+
echo 'if [ -d "/tmp/run/mountd/$DEVICENAME/sharing/config/transmission" ]; then'
71+
echo '/etc/init.d/transmission restart'
72+
echo 'fi'
73+
} >/etc/hotplug.d/usb/60-transmission
74+
6775
cp -r /usr/share/transmission /www/docroot/
6876
rm /www/docroot/transmission/web/index.html /www/docroot/transmission/web/LICENSE
6977

@@ -94,6 +102,7 @@ app_transmission() {
94102
rm -r /www/docroot/transmission
95103
rm -r /etc/config/transmission*
96104
rm -r /var/transmission
105+
rm /etc/hotplug.d/usb/60-transmission
97106
uci set modgui.app.transmission_webui="0"
98107
uci commit modgui
99108
}

0 commit comments

Comments
 (0)