Skip to content

Instantly share code, notes, and snippets.

@AnoopAlias
Created September 14, 2021 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnoopAlias/01399b1470b05d2ca640e2ac41fbf554 to your computer and use it in GitHub Desktop.
Save AnoopAlias/01399b1470b05d2ca640e2ac41fbf554 to your computer and use it in GitHub Desktop.
#!/bin/bash
RESELLER="eightyse"
TARGET_HOST="absinthe.hostns.io"
TARGET_HOST_SSH_PORT="22"
for dir in $(cat /etc/userdatadomains|grep -w ${RESELLER}|awk -F"==" '{print $5}')
do
for myfile in $(find ${dir} -iname .htaccess)
do
rsync -av -e "ssh -p ${TARGET_HOST_SSH_PORT}" ${myfile} root@${TARGET_HOST}:${myfile}
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment