Skip to content

Commit 3711cd8

Browse files
committed
fix cleanup-dependencies by invoking it after package upgrade
1 parent 1e26fe7 commit 3711cd8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

plugin/plugins/dynamix.unraid.net.plg

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ for txz_file in /boot/config/plugins/dynamix.my.servers/dynamix.unraid.net-*.txz
228228
fi
229229
done
230230
231-
# Clean up any old node_modules archives (on the boot drive) that don't match our current version
232-
/etc/rc.d/rc.unraid-api cleanup-dependencies
233-
234231
# Remove existing node_modules directory
235232
echo "Cleaning up existing node_modules directory..."
236233
if [ -d "/usr/local/unraid-api/node_modules" ]; then
@@ -245,6 +242,12 @@ if [ $? -ne 0 ]; then
245242
exit 1
246243
fi
247244
245+
# Clean up any old node_modules archives (on the boot drive) that don't match our current version
246+
#
247+
# Must run after package installation because it provides an update api config file,
248+
# which determines the current API version and vendor archive to keep.
249+
/etc/rc.d/rc.unraid-api cleanup-dependencies
250+
248251
if [[ -n "$TAG" && "$TAG" != "" ]]; then
249252
printf -v sedcmd 's@^\*\*Unraid Connect\*\*@**Unraid Connect (%s)**@' "$TAG"
250253
sed -i "${sedcmd}" "/usr/local/emhttp/plugins/dynamix.unraid.net/README.md"

0 commit comments

Comments
 (0)