File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 134134# Handle the unraid-components directory
135135DIR=/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
136136if [ -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- "
139139fi
140140
141141echo "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 >
You can’t perform that action at this time.
0 commit comments