Sympl Scripts issueshttps://gitlab.com/sympl.io/sympl-scripts/-/issues2021-11-29T03:25:50Zhttps://gitlab.com/sympl.io/sympl-scripts/-/issues/2cpanel-import: restores choke with some backup files2021-11-29T03:25:50ZPaul Cammishcpanel-import: restores choke with some backup filesDue 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_impor...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
```https://gitlab.com/sympl.io/sympl-scripts/-/issues/1import-cpanel: doesnt import mail alias/forward configurations2021-03-12T14:42:22ZPaul Cammishimport-cpanel: doesnt import mail alias/forward configurationsAt present the script skips importing mailbox forwards.
These are located in the backup at `va/<domain_name>` and are of the format:
```text
*: unix_username
localpart@example.com: destination1@example.org
localpart2@example.com: destina...At present the script skips importing mailbox forwards.
These are located in the backup at `va/<domain_name>` and are of the format:
```text
*: unix_username
localpart@example.com: destination1@example.org
localpart2@example.com: destination2@example.net
multiple@example.com: destination1@example.org,destination2@example.net
```https://gitlab.com/sympl.io/sympl-scripts/-/issues/3import-cpanel: issues with nested webroots2021-03-12T14:50:00ZPaul Cammishimport-cpanel: issues with nested webrootsIf you have a webroot which contains another webroot, you can end up moving the parent before the child has been moved, which errors out.
A workaround would be this, but it will leave copies of the webroots in the old home dir and dupli...If you have a webroot which contains another webroot, you can end up moving the parent before the child has been moved, which errors out.
A workaround would be this, but it will leave copies of the webroots in the old home dir and duplicate content, so will need cleaning up after
```
if [ $DO_IMPORT ]; then
_bold
echo -n " Creating site $domain..."
mkdir -p /srv/$domain/public
echo ' ok'
echo " Importing site files..."
# rsync -a --info progress2 --remove-source-files $import_directory/$target_htdocs/ /srv/$domain/public/htdocs
rsync -a --info progress2 $import_directory/$target_htdocs/ /srv/$domain/public/htdocs
# rm -rf $import_directory/$target_htdocs
for this_alias in $target_aliases; do
if [ "$this_alias" != "www.$domain" ]; then
echo -n " Adding alias $this_alias to $domain..."
ln -fs /srv/$domain /srv/$this_alias
chown -h sympl:sympl /srv/$this_alias
echo ' ok'
else
echo " Skipping alias $this_alias - automatically added by Sympl"
fi
done
_normal
fi
```