diff --git a/bin/vhost-exp.sh b/bin/vhost-exp.sh index 5a0def8..035d4af 100755 --- a/bin/vhost-exp.sh +++ b/bin/vhost-exp.sh @@ -119,19 +119,25 @@ if [[ -d /srv/www/$domain ]]; then echo "/usr/local/bin/vhost-mysql-db-add.sh -d $domain -u $dbuser -p $dbpass" servername=`hostname -f` - echo "rsync -vn --archive --exclude='.passwd' --rsh=/usr/bin/ssh root@$servername:/home/$username/ /home/$username/" - echo "rsync -vn --archive --exclude='.my.cnf' --rsh=/usr/bin/ssh root@$servername:/srv/www/$domain/ /srv/www/$domain/" + echo "rsync -v --archive --exclude='.passwd' --rsh=/usr/bin/ssh root@$servername:/home/$username/ /home/$username/" + echo "rsync -v --archive --exclude='.my.cnf' --rsh=/usr/bin/ssh root@$servername:/srv/www/$domain/ /srv/www/$domain/" #db import - if [[ -f /srv/www/$domain/.exp/$database.sql ]]; then - echo "mysql $database < /srv/www/$domain/.exp/$database.sql" + if [[ -f /srv/www/$domain/.exp/mysql/$database.sql ]]; then + echo "mysql $database < /srv/www/$domain/.exp/mysql/$database.sql" fi # /etc/ configs if [[ -d /srv/www/$domain/.exp/etc ]]; then echo "cp -a /srv/www/$domain/.exp/etc/* /etc/" + echo "rm -r /srv/www/$domain/.exp/" + echo "systemctl reload apache2.service" + echo "systemctl reload php7.4-fpm" fi + echo + echo "NOTE: check for PHP version on new server and adjust /srv/www/$domain/.exp/etc/php/ config and reload command accordingly" + fi else