From 790d894857dec9f94bbf73cb5c8e3c6f19ac9591 Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Tue, 16 Apr 2013 23:29:55 +0200 Subject: [PATCH] Modifications : etc/nginx/site.d/lhc-stats/configure.sh . --- etc/mysql/bin/createuser | 5 +++-- etc/nginx/site.d/lhc-stats/configure.sh | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/mysql/bin/createuser b/etc/mysql/bin/createuser index 6d19c61..041495e 100755 --- a/etc/mysql/bin/createuser +++ b/etc/mysql/bin/createuser @@ -1,5 +1,6 @@ #!/bin/sh -eux user="$1" -sudo mysql -u mysql --batch <<-EOF - CALL mysql.create_user($(user), 'localhost'); +sudo -u mysql mysql -u mysql --verbose --batch <<-EOF + CALL mysql.create_user('$user', 'localhost'); EOF +sudo adduser "$user" mysql-data diff --git a/etc/nginx/site.d/lhc-stats/configure.sh b/etc/nginx/site.d/lhc-stats/configure.sh index 15ee1b8..3ab7902 100644 --- a/etc/nginx/site.d/lhc-stats/configure.sh +++ b/etc/nginx/site.d/lhc-stats/configure.sh @@ -1,2 +1,4 @@ sudo adduser lhc_stats__php5 www-"$site" sudo adduser www-"$site"-tls www-"$site" +~mysql/bin/createuser lhc_stats__php5 + -- 2.20.1