autodect write mode
This commit is contained in:
parent
6257436bc6
commit
1d2ae28e86
|
@ -48,9 +48,11 @@ if [[ -d /srv/www/$domain ]]; then
|
||||||
vhost::set-opensslpass
|
vhost::set-opensslpass
|
||||||
password=`echo "$password" | openssl aes-256-cbc -d -a -pass pass:$opensslpass -pbkdf2`
|
password=`echo "$password" | openssl aes-256-cbc -d -a -pass pass:$opensslpass -pbkdf2`
|
||||||
fi
|
fi
|
||||||
|
write=1
|
||||||
else
|
else
|
||||||
echo "NOTICE: system users password not autodetected!"
|
echo "NOTICE: system users password not autodetected!"
|
||||||
password=`/usr/bin/pwgen 12 1`
|
password=`/usr/bin/pwgen 12 1`
|
||||||
|
write=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create export dir
|
# create export dir
|
||||||
|
@ -101,12 +103,12 @@ if [[ -d /srv/www/$domain ]]; then
|
||||||
echo "To migrate to a new server run these commands (as root) from the new server:"
|
echo "To migrate to a new server run these commands (as root) from the new server:"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "/usr/local/bin/vhost-user-add.sh -u $username -p \"$password\" -w"
|
echo "/usr/local/bin/vhost-user-add.sh -u $username -p \"$password\" -w $write"
|
||||||
if [[ -d /usr/jails/$username ]]; then
|
if [[ -d /usr/jails/$username ]]; then
|
||||||
echo "/usr/local/bin/vhost-user-jail.sh -u $username >/dev/null 2>/dev/null &"
|
echo "/usr/local/bin/vhost-user-jail.sh -u $username >/dev/null 2>/dev/null &"
|
||||||
fi
|
fi
|
||||||
echo "/usr/local/bin/vhost-add.sh -d $domain -u $username -w"
|
echo "/usr/local/bin/vhost-add.sh -d $domain -u $username"
|
||||||
echo "/usr/local/bin/vhost-mysql-db-add.sh -d $domain -u $dbuser -p $dbpass -w"
|
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 -vn --archive --exclude='.passwd' --rsh=/usr/bin/ssh root@$servername:/home/$username/ /home/$username/"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user