Update install.sh
Some fixes. Anyway, scripts does not work.
This commit is contained in:
parent
d9fe2e4eda
commit
1e7ca17cb6
1 changed files with 10 additions and 4 deletions
|
@ -12,10 +12,16 @@ set -e
|
|||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
MYSQL_ROOT_PASSWORD=`pwgen 12 -1`
|
||||
|
||||
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password password $MYSQL_ROOT_PASSWORD'
|
||||
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password_again password $MYSQL_ROOT_PASSWORD'
|
||||
|
||||
curl -sL https://deb.nodesource.com/setup_7.x | bash -
|
||||
apt-get -q -y install mariadb-server pwgen nodejs imagemagick git ufw build-essential dnsutils python software-properties-common
|
||||
|
||||
apt-add-repository -y ppa:chris-lea/redis-server
|
||||
apt-get update
|
||||
apt-get -q -y install redis-server
|
||||
|
||||
apt-get clean
|
||||
|
@ -33,10 +39,10 @@ DKIM_API_KEY=`pwgen 12 -1`
|
|||
SMTP_PASS=`pwgen 12 -1`
|
||||
|
||||
# Setup MySQL user for Mailtrain
|
||||
mysql -u root -e "CREATE USER 'mailtrain'@'localhost' IDENTIFIED BY '$MYSQL_PASSWORD';"
|
||||
mysql -u root -e "GRANT ALL PRIVILEGES ON mailtrain.* TO 'mailtrain'@'localhost';"
|
||||
mysql -u root -e "CREATE USER 'mailtrain_ro'@'localhost' IDENTIFIED BY '$MYSQL_RO_PASSWORD';"
|
||||
mysql -u root -e "GRANT SELECT ON mailtrain.* TO 'mailtrain_ro'@'localhost';"
|
||||
mysql -u root -e "CREATE USER 'mailtrain'@'localhost' IDENTIFIED BY '$MYSQL_PASSWORD';" -p$MYSQL_ROOT_PASSWORD
|
||||
mysql -u root -e "GRANT ALL PRIVILEGES ON mailtrain.* TO 'mailtrain'@'localhost';" -p$MYSQL_ROOT_PASSWORD
|
||||
mysql -u root -e "CREATE USER 'mailtrain_ro'@'localhost' IDENTIFIED BY '$MYSQL_RO_PASSWORD';" -p$MYSQL_ROOT_PASSWORD
|
||||
mysql -u root -e "GRANT SELECT ON mailtrain.* TO 'mailtrain_ro'@'localhost';" -p$MYSQL_ROOT_PASSWORD
|
||||
mysql -u mailtrain --password="$MYSQL_PASSWORD" -e "CREATE database mailtrain;"
|
||||
|
||||
# Enable firewall, allow connections to SSH, HTTP, HTTPS and SMTP
|
||||
|
|
Loading…
Reference in a new issue