mirror of
https://github.com/unraid/api.git
synced 2026-01-04 07:29:48 -06:00
plg: update showchanges script
This commit is contained in:
@@ -315,6 +315,7 @@ if [ -e /etc/rc.d/rc.unraid-api ]; then
|
||||
FILE=/usr/local/emhttp/plugins/dynamix/include/UpdateDNS.php && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix.plugin.manager/Update.page && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/showchanges && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix.my.servers/MyServers.page && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix.my.servers/Registration.page && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix.my.servers/include/myservers1.php && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
@@ -444,6 +445,16 @@ if [[ -n $LINENUM ]]; then
|
||||
mv -f "$FILE~" "$FILE"
|
||||
fi
|
||||
|
||||
# patch showchanges script, starting with 6.11.0-rc1
|
||||
# search text: $valid = ['/var/tmp/','/tmp/plugins/'];
|
||||
# replacement text: $valid = ['/var/tmp/','/tmp/plugins/','/boot/previous'];
|
||||
FILE=/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/showchanges
|
||||
if test -f "${FILE}" && ! grep -q "'/boot/previous'" "${FILE}" &>/dev/null; then
|
||||
# backup the file so it can be restored later
|
||||
cp -f "$FILE" "$FILE-"
|
||||
sed -i '/$valid = \[/c$valid = ['"'/var/tmp/'"','"'/tmp/plugins/'"','"'/boot/previous'"'];' "$FILE"
|
||||
fi
|
||||
|
||||
# move settings on flash drive
|
||||
CFG_OLD=/boot/config/plugins/Unraid.net
|
||||
CFG_NEW=/boot/config/plugins/dynamix.my.servers
|
||||
|
||||
Reference in New Issue
Block a user