From 50310b0e4513ee3fcce67351ae61e8fff851130e Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Fri, 6 Jul 2018 11:13:06 +0200 Subject: Mappák átnevezve: mayor --> mayor-mod; mayor-installer --> mayor-installer-mod; mayor-installer-fcgi --> mayor-installer-fcgi-mod --- .../fcgi_install.d/45intezmeny.sh | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100755 mayor-installer-fcgi-mod/fcgi_install.d/45intezmeny.sh (limited to 'mayor-installer-fcgi-mod/fcgi_install.d/45intezmeny.sh') diff --git a/mayor-installer-fcgi-mod/fcgi_install.d/45intezmeny.sh b/mayor-installer-fcgi-mod/fcgi_install.d/45intezmeny.sh new file mode 100755 index 00000000..c41dda18 --- /dev/null +++ b/mayor-installer-fcgi-mod/fcgi_install.d/45intezmeny.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# + +cat < $TMPDIR/mysql/intezmeny.sql + +insert into $DB.intezmeny (OMKod, rovidNev, nev, alapertelmezett) VALUES ('$OMKOD','$ROVID','$INTEZMENYNEV',1); +create database intezmeny_$ROVID character set utf8 collate utf8_hungarian_ci; +grant select,execute on intezmeny_$ROVID.* to '$USERREAD'@'localhost'; +grant all on intezmeny_$ROVID.* to '$USER'@'localhost'; +use intezmeny_$ROVID; + +EOF + +if [ "$MYSQLROOTPW" == "" ]; then + read -p " A mysql root jelszó -ha van!- (a begépelt szöveg nem látszik!): " -s MYSQLROOTPW +fi +#Ezt miért is akarom kiírni? +#echo $MYSQLROOTPW - a jelszó +if [ "$MYSQLROOTPW" = "" ]; +then + MYSQLROOTPWSTR=""; +else + MYSQLROOTPWSTR="-p$MYSQLROOTPW --user=root" +fi + +cat $TMPDIR/mysql/intezmeny.sql $MAYORDIR/install/module-naplo/mysql/intezmeny.sql | mysql $MYSQLROOTPWSTR --default-character-set=utf8 $INTEZMENYDB -- cgit v1.2.3