找回密码
 立即注册
查看: 762|回复: 0

unraid安装unbalance插件

[复制链接]
发表于 2021-2-7 09:18 | 显示全部楼层 |阅读模式
概要:

网络问题,手动、离线安装unbalance插件:
    获取plg文件(可能可以跳过步骤2和3)从github下载包unbalance-master.zip,并将zip文件转为tar.gz格式文件移动到u盘的 config\plugins\unbalance 下进入gui,点击该链接的plg文件安装
流程:

因unraid的插件安装,会从github的这个链接 https://raw.githubusercontent.com/ 下载,但这个链接被无法访问,也就不能在线下载这个插件
报错如下图
故,手动下载插件,它有两部分,一个是plg文件,一个压缩包。
~~
一、获取plg文件plg文件:

https://raw.githubusercontent.com/jbrodriguez/unraid/master/plugins/unbalance.plg
plg文件内容我放到最后,复制一下到一个空的txt文件,然后改下后缀就好。
成品图
二、压缩包:

github下载
jbrodriguez/unbalance
将zip格式转换tar.gz格式,网上教程很多啦
最终文件名如图,把master去掉后
三、文件移动到u盘

config\plugins\unbalance 下
四、gui界面安装

手动点到plg文件,然后安装即可。实测可以安装,倒腾了我两个小时。
感谢阅读!




plg文件内容:
  1. <?xml version='1.0' standalone='yes'?>
  2. <!DOCTYPE PLUGIN [
  3. <!ENTITY name        "unbalance">
  4. <!ENTITY author      "Juan B. Rodriguez">
  5. <!ENTITY version     "v2019.10.26">
  6. <!ENTITY appver      "5.6.3">
  7. <!ENTITY launch      "Settings/&name;">
  8. <!ENTITY pluginURL   "https://raw.githubusercontent.com/jbrodriguez/unraid/master/plugins/&name;.plg">
  9. <!ENTITY bundle      "&name;-&appver;.tgz">
  10. <!ENTITY md5         "1e57e2c5d951ce9ba171860c82f410cb">
  11. ]>
  12. <PLUGIN  name="&name;"
  13.          author="&author;"
  14.          version="&version;
  15.          appver="&appver;"
  16.          launch="&launch;"
  17.          pluginURL="&pluginURL;"
  18. >
  19. <CHANGES>
  20. 2019-10-26 - 5.6.3
  21. - Support 6.8.x
  22. - Add missing isNumber function
  23. - Upgrade some libraries
  24. - Switch to yarn
  25. </CHANGES>
  26. <!--
  27. The plugin frees up space from a disk array in unRAID systems.
  28. -->
  29. <!--
  30. Get the unBALANCE bundle.
  31. -->
  32. <FILE Name="/boot/config/plugins/&name;/&bundle;">
  33. <URL>"https://github.com/jbrodriguez/unbalance/releases/download/&appver;/&bundle;"</URL>
  34. <MD5>&md5;</MD5>
  35. </FILE>
  36. <!-- Install default plugin cfg  -->
  37. <FILE Name="/boot/config/plugins/unbalance/unbalance.cfg">
  38. <INLINE>
  39. <![CDATA[
  40. SERVICE="disable"
  41. PORT="6237"
  42. RUNAS="nobody"
  43. ]]>
  44. </INLINE>
  45. </FILE>
  46. <!--
  47. Prepare for installation.
  48. -->
  49. <FILE Run="/bin/bash">
  50. <INLINE>
  51. running=$(pidof controlr | wc -w)
  52. # Remove emhttp files so we can re-install.
  53. rm -rf /usr/local/emhttp/plugins/&name;/* 2>/dev/null
  54. # Remove old 'bundle' files.
  55. rm -f $(ls /boot/config/plugins/&name;/&name;*.tgz 2>/dev/null | grep -v '&appver;')
  56. # Install the 'bundle'.
  57. tar -xf /boot/config/plugins/&name;/&bundle; -C /usr/local/emhttp/plugins
  58. # start the plugin if it was running previously
  59. if [ $running -eq 1 ]; then
  60.         /usr/local/emhttp/plugins/&name;/scripts/start
  61. fi
  62. echo ""
  63. echo "-----------------------------------------------------------"
  64. echo " unBALANCE has been installed."
  65. echo " Copyright (c) &author;"
  66. echo " Version: &version;"
  67. echo "-----------------------------------------------------------"
  68. echo ""
  69. </INLINE>
  70. </FILE>
  71. <!--
  72. The 'remove' script.
  73. -->
  74. <FILE Run="/bin/bash" Method="remove">
  75. <INLINE>
  76. /usr/local/emhttp/plugins/&name;/scripts/stop
  77. # Remove all plugin files.
  78. rm -rf /usr/local/emhttp/plugins/&name;
  79. rm -rf /boot/config/plugins/&name;
  80. echo ""
  81. echo "-----------------------------------------------------------"
  82. echo " unBALANCE has been removed."
  83. echo " Copyright (c) &author;"
  84. echo " Version: &version;"
  85. echo "-----------------------------------------------------------"
  86. echo ""
  87. </INLINE>
  88. </FILE>
  89. <FILE Name="/tmp/unbalance-chkconf" Run="/bin/bash">
  90. <INLINE>
  91. <![CDATA[
  92. #!/bin/sh
  93. # This will check each entry in the config so nothing is missing, and if missing, sets to default
  94. CFGFILE=/boot/config/plugins/unbalance/unbalance.cfg
  95. [ ! `cat "$CFGFILE" | grep SERVICE` ] && echo "SERVICE=\"disable\"" >> "$CFGFILE"
  96. [ ! `cat "$CFGFILE" | grep ^PORT` ] && echo "PORT=\"6237\"" >> "$CFGFILE"
  97. [ ! `cat "$CFGFILE" | grep RUNAS` ] && echo "RUNAS=\"nobody\"" >> "$CFGFILE"
  98. rm /tmp/unbalance-chkconf
  99. ]]>
  100. </INLINE>
  101. </FILE>
  102. <FILE Name="/tmp/unbalance-chkconf2" Run="/bin/bash">
  103. <INLINE>
  104. <![CDATA[
  105. #!/bin/sh
  106. # This should run for v5.0.x only
  107. # If unbalance.conf is present, reset the rsyncArgs flag to the new default
  108. CONF=/boot/config/plugins/unbalance/unbalance.conf
  109. [ -f "$CONF" ] && sed -i 's/rsyncArgs.*/rsyncArgs=-X/' "$CONF"
  110. rm /tmp/unbalance-chkconf2
  111. ]]>
  112. </INLINE>
  113. </FILE>
  114. </PLUGIN>
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-11-22 13:03 , Processed in 0.123456 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表