Skip to content

Commit 6981b77

Browse files
committed
chore: fix changelog plugin to actaully remove webcomponents folder
1 parent 571e578 commit 6981b77

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plugin/plugins/dynamix.unraid.net.plg

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ done
134134
# Handle the unraid-components directory
135135
DIR=/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
136136
if [ -d "$DIR" ] && [ ! -d "$DIR-" ]; then
137-
cp -rp "$DIR" "$DIR-"
138-
echo "Backed up directory: $DIR"
137+
mv "$DIR" "$DIR-"
138+
echo "Moved directory: $DIR to $DIR-"
139139
fi
140140
141141
echo "Backup complete."
@@ -204,12 +204,13 @@ exit 0
204204
205205
# Handle the unraid-components directory
206206
DIR=/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
207-
# certain instances where the directory is not present and others where it is, ensure we delete it before we restore it
207+
# Remove the archive's contents before restoring
208208
if [ -d "$DIR" ]; then
209209
rm -rf "$DIR"
210210
fi
211211
if [ -d "$DIR-" ]; then
212-
mv -f "$DIR-" "$DIR"
212+
mv "$DIR-" "$DIR"
213+
echo "Restored directory: $DIR- to $DIR"
213214
fi
214215
]]>
215216
</INLINE>

0 commit comments

Comments
 (0)