[refactor][wip] Also backup directories in /nsm

This commit is contained in:
William Wernert
2020-11-04 14:20:51 -05:00
parent 1e41b9ba31
commit b4446cba9a

View File

@@ -1442,8 +1442,11 @@ reinstall_init() {
mv /opt/so "/opt/so_old_${date_string}"
fi
# Remove container data directories
rm -rf /nsm/mysql
# Backup /nsm for the same reason
while IFS= read -r -d '' dir; do
mv "$dir" "${dir}_old_${date_string}"
done < <(find /nsm -maxdepth 1 -mindepth 1 -type d -print0)
# Remove the old launcher package in case the config changes
if [ $OS = 'centos' ]; then