cpanel-import: restores choke with some backup files
Due to the subdirectory in the backup sometimes being named with something other than the previous unix username, ie: backup_datestamp_username
, the backup script will error out.
Possible fix:
import_user=$( find /tmp/_sympl_import_cpanel/$archive_name -maxdepth 1 -mindepth 1 -type d -printf "%f\n" )
import_directory="$unpacked_dir/$import_user"
if [ $( echo $import_user | grep -c '_' ) -gt 0 ]; then
# backup files sometimes are named differently
import_user=$( echo "$import_user" | sed 's|.*_||' )
fi