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/60portal.sh | 119 +++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100755 mayor-installer-fcgi-mod/fcgi_install.d/60portal.sh (limited to 'mayor-installer-fcgi-mod/fcgi_install.d/60portal.sh') diff --git a/mayor-installer-fcgi-mod/fcgi_install.d/60portal.sh b/mayor-installer-fcgi-mod/fcgi_install.d/60portal.sh new file mode 100755 index 00000000..62d5353e --- /dev/null +++ b/mayor-installer-fcgi-mod/fcgi_install.d/60portal.sh @@ -0,0 +1,119 @@ +#!/bin/bash +# + +cat < " + PW=$(pwgen -s1 32) + if [ "$ROVID" = "" ]; then + ROVID="demo" + fi + cat "$MAYORDIR/config/$file.example" | sed -e "s/%SQLPW%/$PW/" -e "s/demo/${ROVID}/" > "$MAYORDIR/config/$file" + echo $file +fi + +echo -e "\n SQL file létrehozása... " +if [ ! -d $TMPDIR/mysql ]; then + mkdir -p $TMPDIR/mysql +fi +cd $TMPDIR/mysql +PDB=$(grep db $MAYORDIR/config/$file | sed -e "s/.*=\ *['\"]//g" -e "s/['\"];//g") +USER=$(grep user $MAYORDIR/config/$file | sed -e "s/.*=\ *['\"]//g" -e "s/['\"];//g") +PW=$(grep pw $MAYORDIR/config/$file | sed -e "s/.*=\ *['\"]//g" -e "s/['\"];//g") + +cat $MAYORDIR/install/mayor-portal/mysql/mayor-portal.sql | sed \ + -e "s/%MYSQL_PORTAL_DB%/$PDB/g" \ + -e "s/%MYSQL_PORTAL_USER%/$USER/g" \ + -e "s/%MYSQL_PORTAL_PW%/$PW/g" > mayor-portal.sql + +DB=$(grep db $MAYORDIR/config/private-conf.php | sed -e "s/^.*>\ *['|\"]//g" -e "s/['|\"],//g") +cat $MAYORDIR/install/mayor-portal/mysql/portal-init.sql | sed \ + -e "s/%MYSQL_PRIVATE_DB%/$DB/g" \ + -e "s/%MYSQL_PORTAL_DB%/$PDB/g" > portal-init.sql + +read -n 1 -p "Telepíthetem? (i/N)" -s DO +if [ "$DO" != "i" ]; then echo " ok, kiléptem..."; exit 1; fi +echo -e "\n" + +if [ "$MYSQLROOTPW" == "" ]; then + read -p " A mysql root jelszó -ha van- (a begépelt szöveg nem látszik!): " -s MYSQLROOTPW +fi + +if [ "$MYSQLROOTPW" = "" ]; +then + MYSQLROOTPWSTR=""; +else + MYSQLROOTPWSTR="-p$MYSQLROOTPW --user=root" +fi + + +cat /tmp/mysql/mayor-portal.sql /tmp/mysql/portal-init.sql | mysql $MYSQLROOTPWSTR --default-character-set=utf8 + +read -n 1 -p "Tegyük a portál oldalt a rendszer kezdőlapjává minden hozzáférési szinten? (i/N)" -s DO +if [ "$DO" != "i" ]; then + echo -e "\nA portál oldalt nem teszem kezdőlappá.\n"; + cat <'portal', 'sub' => 'portal', 'f' => 'portal');/" $MAYORDIR/config/$file + echo ok + done +fi + +if [ "$ROVID" != "demo" ]; then + echo -e "\nEgyedi kezdőoldalak létrehozása:" + for policy in private public parent; do + echo -n " $policy " + for skin in classic pda; do + cp $MAYORDIR/www/policy/$policy/portal/portal/portal_demo.$skin.php $MAYORDIR/www/policy/$policy/portal/portal/portal_$ROVID.$skin.php + echo -n "... " + done + echo "ok" + done +fi + -- cgit v1.2.3