Introducing text alias for steps
This commit is contained in:
2019-04-08 14:44:31 +01:00
parent baef4e8d56
commit e6313d2c32
4 changed files with 139 additions and 71 deletions

View File

@@ -24,13 +24,13 @@ step_2() {
step_3_info() { echo "Adding user for $toolName (git:git)"; }
step_3() {
adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git
saveReturn $?
endReturn
}
@@ -85,7 +85,7 @@ step_10() {
mysql -u root -e 'CREATE DATABASE '$mysqlDatabase' CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
saveReturn $?
endReturn
echo "Existing mysql user:"
mysql -u root -e 'SELECT User, Host FROM mysql.user;'
echo -en "Enter mysql user name: "
@@ -98,7 +98,7 @@ step_10() {
mysql -u root -e 'CREATE USER '"'"$mysqlUser"'"'@'"'"'localhost'"'"' IDENTIFIED BY '"'"$mysqlPass"'"';'
saveReturn $?
endReturn
mysql -u root -e 'GRANT ALL PRIVILEGES ON '$mysqlDatabase'.* TO '"'"$mysqlUser"'"'@'"'"'localhost'"'"';'
saveReturn $?
endReturn