nct6687-driver.plg aktualisiert
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE PLUGIN [
|
||||
<!ENTITY name "nct6687-driver">
|
||||
<!ENTITY author "ich777">
|
||||
<!ENTITY version "2022.07.22">
|
||||
<!ENTITY version "2024.07.10">
|
||||
<!ENTITY gitURL "https://github.com/&author;/unraid-&name;/raw/master">
|
||||
<!ENTITY pluginURL "&gitURL;/&name;.plg">
|
||||
<!ENTITY plugin "/boot/config/plugins/&name;">
|
||||
@@ -14,6 +14,9 @@
|
||||
|
||||
<CHANGES>
|
||||
|
||||
###2024.07.10
|
||||
- Add Plugin Update Helper to ensure driver package is downloaded ahead of time when unRAID is updated
|
||||
|
||||
###2022.07.21
|
||||
- Version detection from package via GitHub API
|
||||
- Save md5 in packages directory
|
||||
@@ -135,6 +138,48 @@ if [ ! -f "&emhttp;/images/&name;.png" ]; then
|
||||
cp &plugin;/&name;.png &emhttp;/images/
|
||||
fi
|
||||
|
||||
|
||||
#Check if Plugin Update Helper is downloaded and up-to-date
|
||||
if [ ! -f &plugin;/plugin_update_helper ]; then
|
||||
wget -q -T 5 -O &plugin;/plugin_update_helper "https://raw.githubusercontent.com/ich777/unraid-plugin_update_helper/master/plugin_update_helper"
|
||||
else
|
||||
CUR_V="$(grep -E "Plugin-Update-Helper version:" &plugin;/plugin_update_helper | awk '{print $4}')"
|
||||
if [ ! -s /tmp/update-helper ]; then
|
||||
echo "$(wget -T5 -qO- https://raw.githubusercontent.com/ich777/unraid-plugin_update_helper/master/plugin_update_helper | grep -E "Plugin-Update-Helper version:" | awk '{print $4}')" > /tmp/update-helper
|
||||
AVAIL_V="$(cat /tmp/update-helper)"
|
||||
else
|
||||
AVAIL_V="$(cat /tmp/update-helper)"
|
||||
fi
|
||||
if [ ! -z "$AVAIL_V" ]; then
|
||||
COMPARE="$(sort -V <(echo -e "${AVAIL_V}\n$CUR_V") | tail -1)"
|
||||
if [ "$CUR_V" != "$COMPARE" ]; then
|
||||
wget -q -T 5 -O &plugin;/plugin_update_helper "https://raw.githubusercontent.com/ich777/unraid-plugin_update_helper/master/plugin_update_helper"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#Check if Plugin Update Helper is installed and up to date
|
||||
if [ ! -f /usr/bin/plugin_update_helper ]; then
|
||||
cp &plugin;/plugin_update_helper /usr/bin/plugin_update_helper
|
||||
chmod +x /usr/bin/plugin_update_helper
|
||||
else
|
||||
PLUGIN_V="$(grep -E "Plugin-Update-Helper version:" &plugin;/plugin_update_helper | awk '{print $4}')"
|
||||
INST_V="$(grep -E "Plugin-Update-Helper version:" /usr/bin/plugin_update_helper | awk '{print $4}')"
|
||||
COMPARE="$(sort -V <(echo -e "${PLUGIN_V}\n$INST_V") | tail -1)"
|
||||
if [ "$INST_V" != "$COMPARE" ]; then
|
||||
kill $(ps aux | grep -E "inotifywait -q /boot/changes.txt -e move_self,delete_self" | grep -v "grep -E inotifywait" | awk '{print $2}') 2>/dev/null
|
||||
sleep 1
|
||||
cp &plugin;/plugin_update_helper /usr/bin/plugin_update_helper
|
||||
chmod +x /usr/bin/plugin_update_helper
|
||||
fi
|
||||
fi
|
||||
|
||||
#Start Plugin Update Helper
|
||||
if [ -z "$(ps aux | grep -E "inotifywait -q /boot/changes.txt -e move_self,delete_self" | grep -v "grep -E inotifywait" | awk '{print $2}')" ]; then
|
||||
echo "/usr/bin/plugin_update_helper" | at now > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
||||
echo
|
||||
echo "----------------Installation of NCT6687d Drivers successful------------------"
|
||||
echo
|
||||
|
Reference in New Issue
Block a user