ewft.minidlna.plg 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version='1.0' standalone='yes'?>
  2. <!DOCTYPE PLUGIN [
  3. <!ENTITY name "ewft.minidlna">
  4. <!ENTITY author "EWFT">
  5. <!ENTITY version "2021.01.17a">
  6. <!ENTITY launch "Settings/ewft.minidlna">
  7. <!ENTITY pluginURL "https://git.ewft.org/Unraid/ewft.minidlna/raw/master/ewft.minidlna.plg">
  8. <!ENTITY pkgURL "https://git.ewft.org/Unraid/ewft.minidlna/raw/master/build/">
  9. <!ENTITY minidlnapkg "minidlna-1.3.0_static">
  10. <!ENTITY minidlnaMD5 "338b106e1dd12d994be41d6815050ba5">
  11. <!ENTITY plginpkg "ewft.minidlna">
  12. <!ENTITY plginMD5 "dfae62c8ea5675f5850a64113d6d1acf">
  13. <!ENTITY menupkg "ewft.menu">
  14. <!ENTITY menupkgMD5 "56c7a49d0c1b6355b7ff99560d4a5b1e">
  15. <!ENTITY pluginLoc "/boot/config/plugins/&name;">
  16. ]>
  17. <PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" min="6.4.0">
  18. <CHANGES>
  19. ##&name;
  20. ###&version;
  21. ###2021.01.17
  22. - Initial release
  23. </CHANGES>
  24. <!-- PRE-INSTALL SCRIPT -->
  25. <FILE Run="/bin/bash">
  26. <INLINE>
  27. </INLINE>
  28. </FILE>
  29. <!-- SOURCE PACKAGE -->
  30. <FILE Name="&pluginLoc;/&minidlnapkg;.txz" Run="upgradepkg --install-new --reinstall">
  31. <URL>&pkgURL;&minidlnapkg;.txz</URL>
  32. <MD5>&minidlnaMD5;</MD5>
  33. </FILE>
  34. <FILE Name="&pluginLoc;/&plginpkg;.txz" Run="upgradepkg --install-new --reinstall">
  35. <URL> &pkgURL;&plginpkg;.txz</URL>
  36. <MD5>&plginMD5;</MD5>
  37. </FILE>
  38. <FILE Name="&pluginLoc;/&menupkg;.txz" Run="upgradepkg --install-new --reinstall">
  39. <URL> &pkgURL;&menupkg;.txz</URL>
  40. <MD5>&menupkgMD5;</MD5>
  41. </FILE>
  42. <FILE Name="&pluginLoc;/minidlna.conf" Run="upgradepkg --install-new --reinstall">
  43. <URL>https://git.ewft.org/Unraid/ewft.minidlna/raw/master/minidlna.conf</URL>
  44. </FILE>
  45. <FILE Name="/boot/config/plugins/&name;/&name;.cfg">
  46. <INLINE>
  47. <![CDATA[
  48. # EWFT MiniDLNA
  49. SERVICE="enable"
  50. ]]>
  51. </INLINE>
  52. </FILE>
  53. <!-- POST-INSTALL SCRIPT -->
  54. <FILE Run="/bin/bash">
  55. <INLINE>
  56. cp /boot/config/plugins/&name;/minidlna.conf /etc/
  57. [ -e "/etc/rc.d/rc.ewft.minidlna" ] &amp;&amp; rm -f "/etc/rc.d/rc.ewft.minidlna"
  58. ln -s "/usr/local/emhttp/plugins/ewft.minidlna/scripts/rc.ewft.minidlna" "/etc/rc.d/rc.ewft.minidlna"
  59. echo ""
  60. echo "-----------------------------------------------------------"
  61. echo " Plugin &name; is installed."
  62. echo " Version: &version;"
  63. echo "-----------------------------------------------------------"
  64. echo ""
  65. </INLINE>
  66. </FILE>
  67. <!-- REMOVE SCRIPT -->
  68. <FILE Run="/bin/bash" Method="remove">
  69. <INLINE>
  70. # Remove plugin related files
  71. rm -rf /etc/minidlna.conf
  72. rm -f "/etc/rc.d/rc.ewft.minidlna"
  73. # Uninstall the 'source' package
  74. removepkg minidlna-1.3.0_static
  75. removepkg ewft.minidlna
  76. removepkg ewft.menu
  77. </INLINE>
  78. </FILE>
  79. </PLUGIN>