default E2 Favorites folder remover

    • default E2 Favorites folder remover

      this way is litle crazy, but cant see other way cause
      my skils are limited and DMM ignores requests for fix that problem

      chmod 755 /usr/script/remove_def_favorites.sh

      Shell-Script

      1. #!/bin/sh
      2. E2config="/etc/enigma2/settings"
      3. foo="$0"
      4. crntNamePath=${foo%.*}
      5. crntNameExt=${foo##*/}
      6. crntNameShort=${crntNameExt%.*}
      7. fileCmd=/tmp/"$crntNameShort".CMD
      8. DateSTR=`date +%y.%m.%d.\ %H:%M:%S`
      9. LOGSTR="$crntNameShort: -> "
      10. if [ ! -f "$fileCmd" ]; then
      11. echo $DateSTR $LOGSTR"STARTED - pid: $$"
      12. else
      13. echo $DateSTR $LOGSTR"ABORTED - cant run twice"
      14. exit
      15. fi
      16. #
      17. # kill copyes of self
      18. #
      19. pids=`ps| grep $crntNameExt| grep -v grep| grep -v $$| sed -e 's/ [a-z].*$//g'`
      20. if [ -n "$pids" ]; then
      21. kill -9 $pids>/dev/null
      22. fi
      23. #
      24. # check bouquets file
      25. #
      26. DefIsFound=`grep 'userbouquet.favourites.tv' /etc/enigma2/bouquets.tv`
      27. if [ ! "$DefIsFound" ]; then
      28. DateSTR=`date +%y.%m.%d.\ %H:%M:%S`
      29. echo $DateSTR $LOGSTR"ABORTED - cause Default bouquet not Found"
      30. exit
      31. fi
      32. #
      33. # check E2 configfile
      34. #
      35. if [ ! -f $E2config ]; then
      36. DateSTR=`date +%y.%m.%d.\ %H:%M:%S`
      37. echo $DateSTR $LOGSTR"ABORTED - !!! Enigma2 configfile not found !!!"
      38. exit
      39. fi
      40. #
      41. # check multibouquets is on
      42. #
      43. mbON=`grep multibouquet=true "$E2config"`
      44. if [ ! $mbON ]; then
      45. DateSTR=`date +%y.%m.%d.\ %H:%M:%S`
      46. echo $DateSTR $LOGSTR"ABORTED - cause multibouquets isnt activated"
      47. exit
      48. fi
      49. #
      50. # Web-IF Port Nummber
      51. #
      52. WebIfCount=`grep 'Webinterface.interfacecount=' "$E2config"| sed -e 's/.*interfacecount=//'`
      53. if [ ! $WebIfCount ]; then
      54. DateSTR=`date +%y.%m.%d.\ %H:%M:%S`
      55. echo $DateSTR $LOGSTR"WebIf isnt defined, add parameters to E2 config"
      56. echo "config.plugins.Webinterface.interfacecount=2">>"$E2config"
      57. echo "config.plugins.Webinterface.interfaces.0.useauth=true">>"$E2config"
      58. echo "config.plugins.Webinterface.interfaces.1.port=81">>"$E2config"
      59. echo "config.plugins.Webinterface.interfaces.1.useauth=false">>"$E2config"
      60. echo "config.plugins.Webinterface.interfaces.1.address=127.0.0.1">>"$E2config"
      61. echo "config.plugins.Webinterface.includemedia=true">>"$E2config"
      62. echo "config.plugins.Webinterface.autowritetimer=true">>"$E2config"
      63. killall -9 enigma2
      64. WebIfCount=2
      65. sleep 30
      66. fi
      67. FreePort="0"
      68. IfNr="0"
      69. while [ "$FreePort" = "0" ]
      70. do
      71. PortDec=`grep 'Webinterface.interfaces.'$IfNr'.port=' "$E2config"| sed -e 's/.*port=//'`
      72. UseAuth=`grep 'Webinterface.interfaces.'$IfNr'.useauth=' "$E2config"| sed -e 's/.*useauth=//'`
      73. Address=`grep 'Webinterface.interfaces.'$IfNr'.address=' "$E2config"| sed -e 's/.*address=//'`
      74. if [ ! $PortDec ]; then PortDec="80"; fi
      75. if [ ! "$UseAuth" -o "$UseAuth" = "false" ] && [ ! "$Address" -o "$Address" = "127.0.0.1" ]; then
      76. FreePort="$PortDec"
      77. elif [ "$WebIfCount" = $((IfNr+1)) ]; then
      78. DateSTR=`date +%y.%m.%d.\ %H:%M:%S`
      79. echo $DateSTR $LOGSTR"create new WebIf port for localhost without autentification"
      80. sed -e s/^config.plugins.Webinterface.interfacecount="$WebIfCount/config.plugins.Webinterface.interfacecount="$((WebIfCount+1))/ "$E2config">"$E2config".tmp
      81. echo "config.plugins.Webinterface.interfaces."$((IfNr+1))".port="$((PortDec+1))>>"$E2config".tmp
      82. echo "config.plugins.Webinterface.interfaces."$((IfNr+1))".useauth=false">>"$E2config".tmp
      83. echo "config.plugins.Webinterface.interfaces."$((IfNr+1))".address=127.0.0.1">>"$E2config".tmp
      84. mv "$E2config".tmp "$E2config"
      85. killall -9 enigma2
      86. FreePort=$((PortDec+1))
      87. sleep 30
      88. #exit
      89. fi
      90. IfNr=$((IfNr+1))
      91. done
      92. DOCMD1="wget -O $fileCmd -q http://localhost:$FreePort/web"
      93. DOCMD2=$DOCMD1/remotecontrol?command=
      94. #
      95. # Wait for service
      96. #
      97. ServiceInfo=0
      98. while [ "$ServiceInfo" = "0" ]
      99. do
      100. sleep 2
      101. DateSTR=`date +%y.%m.%d.\ %H:%M:%S`
      102. echo $DateSTR>>"$fileCmd".tmp
      103. $DOCMD1/subservices
      104. if [ "$?" = "0" ]; then
      105. ServiceInfo=1
      106. fi
      107. done
      108. sleep 2
      109. #
      110. # TV
      111. #
      112. for RcCode in 174 174 174 174 174 174 402 377 401 106 106 106 106 106 139 108 352 ; do
      113. $DOCMD2$RcCode
      114. done
      115. #
      116. # Radio
      117. #
      118. RadioModeON=`grep e1like_radio_mode=true "$E2config"`
      119. if [ ! $RadioModeON ]; then
      120. for RcCode in 174 174 ; do
      121. $DOCMD2$RcCode
      122. done
      123. else
      124. for RcCode in 385 401 106 106 106 106 106 139 108 352 377 174 174 ; do
      125. $DOCMD2$RcCode
      126. done
      127. fi
      Alles anzeigen
      dm7080sstt; 2x dm8000sstt; dm7020s <- Diseq1x4 <- 3x Diseq1x10 <-
      Dishes:
      1.8m 36E;28E;23E;19E;16E;13E;7E
      1.6m 42E;36E
      1.0m 10/9E;5E;1W;8W
      1.0m 15W;22W;30W
      1.1m 4/5W;12W;18W;24W
      1.1m 53E;60E
      1.0m 75E
      TVs: Philips 46pfl9707s; Philips 42pfl9703h
    • its delete bouquets "Favorites(TV)" and "Favorites(Radio)"
      which comes on each Enigma2 starts and also on reload bouquets command dreambox_ip/web/servicelistreload?mode=2

      the script use RemoteControl commands trough WebIF to do that automaticly
      i call it at dreambox startup
      Bilder
      • 090924_screenshot.jpg

        32,49 kB, 720×405, 1.058 mal angesehen
      dm7080sstt; 2x dm8000sstt; dm7020s <- Diseq1x4 <- 3x Diseq1x10 <-
      Dishes:
      1.8m 36E;28E;23E;19E;16E;13E;7E
      1.6m 42E;36E
      1.0m 10/9E;5E;1W;8W
      1.0m 15W;22W;30W
      1.1m 4/5W;12W;18W;24W
      1.1m 53E;60E
      1.0m 75E
      TVs: Philips 46pfl9707s; Philips 42pfl9703h
    • cause on delete it came always back didnt thoug rename will help,
      but thanks, that can propably work rename title without touching filaname

      but anyway is litle stupid from E2 side create new values if there anothers presented

      and where is stile :)
      #NAME Bouquets (TV)
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe00.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe01.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe02.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe03.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe04.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe05.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe06.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe07.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe12.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe08.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.favourites.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe10.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe11.tv" ORDER BY bouquet
      #SERVICE 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe09.tv" ORDER BY bouquet
      dm7080sstt; 2x dm8000sstt; dm7020s <- Diseq1x4 <- 3x Diseq1x10 <-
      Dishes:
      1.8m 36E;28E;23E;19E;16E;13E;7E
      1.6m 42E;36E
      1.0m 10/9E;5E;1W;8W
      1.0m 15W;22W;30W
      1.1m 4/5W;12W;18W;24W
      1.1m 53E;60E
      1.0m 75E
      TVs: Philips 46pfl9707s; Philips 42pfl9703h