From 4ebd6d3a6e1df94f6b8923bac424ecbe9999a31a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Mon, 19 Aug 2013 14:54:14 +0200 Subject: [PATCH] Fixed too long password for mysql. Fixed no enable-drupal target. Fixed no email for drupal installation. --- prj-site | 4 +++- prj-site-make | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/prj-site b/prj-site index 8cb13db..abeae69 100755 --- a/prj-site +++ b/prj-site @@ -3,6 +3,8 @@ op="$1" name="$2" type="$3" +sql_user=`expr substr rdlugoleck_$name 1 16` +sql_password=`pwgen -1 -s 50` -make name=$name type=$type -s -f ~/prj/prj-utils/prj-site-make $op +make name=$name type=$type sql_user=$sql_user sql_password=$sql_password -s -f ~/prj/prj-utils/prj-site-make $op diff --git a/prj-site-make b/prj-site-make index d346be7..f100901 100755 --- a/prj-site-make +++ b/prj-site-make @@ -1,7 +1,4 @@ -#email="dlugolecki.rafal@gmail.com" -sql_user = rdlugoleck_${name} -# this allows me to evaluate pwgen result to value -$(eval sql_password := $(shell pwgen -1 -s 50)) +email="example@example.com" apache_sites = '/etc/apache2/sites-available' project_dir = `pwd`/${name} host = ${name} @@ -128,6 +125,8 @@ create-drupal: create-directories cd ${project_dir}/www && drush en seven toolbar shortcut -y cd ${project_dir}/www && drush vset admin_theme seven +enable-drupal: + purge-drupal: echo "> Removing SQL user" sudo mysql --defaults-file=/etc/mysql/debian.cnf -e "DROP USER '${sql_user}'@'localhost';" -- 2.30.2