work on verbose mode output

This commit is contained in:
Matthew Saunders Brown 2023-10-06 13:40:14 -07:00
parent a94f38f1c1
commit 58221f72c5

View File

@ -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" echo "/usr/local/bin/vhost-mysql-db-add.sh -d $domain -u $dbuser -p $dbpass"
servername=`hostname -f` servername=`hostname -f`
echo "rsync -vn --archive --exclude='.passwd' --rsh=/usr/bin/ssh root@$servername:/home/$username/ /home/$username/" echo "rsync -v --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='.my.cnf' --rsh=/usr/bin/ssh root@$servername:/srv/www/$domain/ /srv/www/$domain/"
#db import #db import
if [[ -f /srv/www/$domain/.exp/$database.sql ]]; then if [[ -f /srv/www/$domain/.exp/mysql/$database.sql ]]; then
echo "mysql $database < /srv/www/$domain/.exp/$database.sql" echo "mysql $database < /srv/www/$domain/.exp/mysql/$database.sql"
fi fi
# /etc/ configs # /etc/ configs
if [[ -d /srv/www/$domain/.exp/etc ]]; then if [[ -d /srv/www/$domain/.exp/etc ]]; then
echo "cp -a /srv/www/$domain/.exp/etc/* /etc/" 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 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 fi
else else