remove write info for mysql db, info is alwasy written now
This commit is contained in:
parent
05172002df
commit
6257436bc6
|
@ -21,7 +21,7 @@ help()
|
|||
echo " -p <password> Password for username. Optional, random password generated if none specified."
|
||||
echo " -x <fpmmax> PHP-FPM pm.max_children. Optional, defaults to 4, recommended range 2-12 on Shared Server."
|
||||
echo " -j <0|1> Whether or not to jail the user. 0 = no, 1 = yes. Default is 1, which can be overridden in main config."
|
||||
echo " -w <0|1> Write user & mysql info to files. 0 = no, 1 = yes. Default is 1, which can be overridden in main config."
|
||||
echo " -w <0|1> Write user info to /home/username/.passwd. 0 = no, 1 = yes. Default is 1, which can be overridden in main config."
|
||||
exit
|
||||
}
|
||||
|
||||
|
@ -121,4 +121,4 @@ fi
|
|||
/usr/local/bin/vhost-add.sh -d $domain -u $username > /dev/null 2>&1
|
||||
|
||||
# add mysql database
|
||||
/usr/local/bin/vhost-mysql-db-add.sh -d $domain -w $write> /dev/null 2>&1
|
||||
/usr/local/bin/vhost-mysql-db-add.sh -d $domain> /dev/null 2>&1
|
||||
|
|
|
@ -19,8 +19,6 @@ help()
|
|||
echo " -d <domain> Domain name of VirtualHost to add db for."
|
||||
echo " -u <username> Username for accessing the database. Optional, autogenerated if none specified."
|
||||
echo " -p <password> Password for username. Optional, random password generated if none specified."
|
||||
echo " -w <0|1> Write db info to /srv/www/domain/.my.cnf and create include in /home/username/.my.cnf."
|
||||
echo " 0 = no, 1 = yes. Default is 1, which can be overridden in main config."
|
||||
echo " -v Verbose - output newly created db info to console."
|
||||
echo ""
|
||||
echo " MySQL database names is based on virtualhost with . replaced by the word 'dot'"
|
||||
|
@ -28,7 +26,6 @@ help()
|
|||
echo " the shell username & the virtualhost name."
|
||||
echo " e.g. for virtualost example.com the db name will be 'exampledotcom' and the"
|
||||
echo " username will be examplec@example.com."
|
||||
echo " It is highly recommended to use either the -w or -v option if you don't use -p."
|
||||
}
|
||||
|
||||
vhost:getoptions "$@"
|
||||
|
@ -79,7 +76,6 @@ mysql -e "GRANT ALL PRIVILEGES ON $database.* TO '$username'@'localhost';"
|
|||
mysqladmin flush-privileges
|
||||
|
||||
# save mysql db info to file
|
||||
if [[ $write == 1 ]]; then
|
||||
touch /srv/www/$domain/.my.cnf
|
||||
chown $vhost_username:$vhost_username /srv/www/$domain/.my.cnf
|
||||
chmod 640 /srv/www/$domain/.my.cnf
|
||||
|
@ -96,7 +92,6 @@ if [[ $write == 1 ]]; then
|
|||
echo "#[client]" > /home/$vhost_username/.my.cnf
|
||||
echo '!include' "/srv/www/$domain/.my.cnf" >> /home/$vhost_username/.my.cnf
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n $verbose ]]; then
|
||||
echo "database=$database user=$username password=$password"
|
||||
|
|
Loading…
Reference in New Issue
Block a user