我是的十八簿 发表于 2021-2-7 09:18

unraid安装unbalance插件

概要:

网络问题,手动、离线安装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文件内容:
<?xml version='1.0' standalone='yes'?>

<!DOCTYPE PLUGIN [
<!ENTITY name      "unbalance">
<!ENTITY author      "Juan B. Rodriguez">
<!ENTITY version   "v2019.10.26">
<!ENTITY appver      "5.6.3">
<!ENTITY launch      "Settings/&name;">
<!ENTITY pluginURL   "https://raw.githubusercontent.com/jbrodriguez/unraid/master/plugins/&name;.plg">
<!ENTITY bundle      "&name;-&appver;.tgz">
<!ENTITY md5         "1e57e2c5d951ce9ba171860c82f410cb">
]>

<PLUGINname="&name;"
         author="&author;"
         version="&version;
         appver="&appver;"
         launch="&launch;"
         pluginURL="&pluginURL;"
>

<CHANGES>
2019-10-26 - 5.6.3

- Support 6.8.x
- Add missing isNumber function
- Upgrade some libraries
- Switch to yarn
</CHANGES>

<!--
The plugin frees up space from a disk array in unRAID systems.
-->

<!--
Get the unBALANCE bundle.
-->
<FILE Name="/boot/config/plugins/&name;/&bundle;">
<URL>"https://github.com/jbrodriguez/unbalance/releases/download/&appver;/&bundle;"</URL>
<MD5>&md5;</MD5>
</FILE>

<!-- Install default plugin cfg-->
<FILE Name="/boot/config/plugins/unbalance/unbalance.cfg">
<INLINE>
<![CDATA[
SERVICE="disable"
PORT="6237"
RUNAS="nobody"
]]>
</INLINE>
</FILE>

<!--
Prepare for installation.
-->
<FILE Run="/bin/bash">
<INLINE>
running=$(pidof controlr | wc -w)

# Remove emhttp files so we can re-install.
rm -rf /usr/local/emhttp/plugins/&name;/* 2>/dev/null

# Remove old 'bundle' files.
rm -f $(ls /boot/config/plugins/&name;/&name;*.tgz 2>/dev/null | grep -v '&appver;')

# Install the 'bundle'.
tar -xf /boot/config/plugins/&name;/&bundle; -C /usr/local/emhttp/plugins

# start the plugin if it was running previously
if [ $running -eq 1 ]; then
        /usr/local/emhttp/plugins/&name;/scripts/start
fi

echo ""
echo "-----------------------------------------------------------"
echo " unBALANCE has been installed."
echo " Copyright (c) &author;"
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
</INLINE>
</FILE>

<!--
The 'remove' script.
-->
<FILE Run="/bin/bash" Method="remove">
<INLINE>
/usr/local/emhttp/plugins/&name;/scripts/stop
# Remove all plugin files.
rm -rf /usr/local/emhttp/plugins/&name;
rm -rf /boot/config/plugins/&name;

echo ""
echo "-----------------------------------------------------------"
echo " unBALANCE has been removed."
echo " Copyright (c) &author;"
echo " Version: &version;"
echo "-----------------------------------------------------------"
echo ""
</INLINE>
</FILE>

<FILE Name="/tmp/unbalance-chkconf" Run="/bin/bash">
<INLINE>
<![CDATA[
#!/bin/sh
# This will check each entry in the config so nothing is missing, and if missing, sets to default
CFGFILE=/boot/config/plugins/unbalance/unbalance.cfg
[ ! `cat "$CFGFILE" | grep SERVICE` ] && echo "SERVICE=\"disable\"" >> "$CFGFILE"
[ ! `cat "$CFGFILE" | grep ^PORT` ] && echo "PORT=\"6237\"" >> "$CFGFILE"
[ ! `cat "$CFGFILE" | grep RUNAS` ] && echo "RUNAS=\"nobody\"" >> "$CFGFILE"
rm /tmp/unbalance-chkconf
]]>
</INLINE>
</FILE>

<FILE Name="/tmp/unbalance-chkconf2" Run="/bin/bash">
<INLINE>
<![CDATA[
#!/bin/sh
# This should run for v5.0.x only
# If unbalance.conf is present, reset the rsyncArgs flag to the new default
CONF=/boot/config/plugins/unbalance/unbalance.conf
[ -f "$CONF" ] && sed -i 's/rsyncArgs.*/rsyncArgs=-X/' "$CONF"
rm /tmp/unbalance-chkconf2
]]>
</INLINE>
</FILE>

</PLUGIN>
页: [1]
查看完整版本: unraid安装unbalance插件