From 58221f72c501c868cc7e48f439a7529547b98c7e Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Fri, 6 Oct 2023 13:40:14 -0700 Subject: [PATCH] work on verbose mode output --- bin/vhost-exp.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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