aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-installer.fcgi/install.d/60portal.sh
diff options
context:
space:
mode:
authorM.Gergo2018-03-28 20:48:05 +0200
committerM.Gergo2018-03-28 20:48:05 +0200
commitcf30dceb15fa65f503c2a3f31f95b08ce1c65d35 (patch)
tree3d51eabdf4c9bc7a3daca03d265c052fb0601ac2 /mayor-installer.fcgi/install.d/60portal.sh
parent20a9412f1f5bc7b7e40ffb24e262cdf20420983c (diff)
downloadmayor-cf30dceb15fa65f503c2a3f31f95b08ce1c65d35.tar.gz
mayor-cf30dceb15fa65f503c2a3f31f95b08ce1c65d35.zip
installer javítás 1
Diffstat (limited to 'mayor-installer.fcgi/install.d/60portal.sh')
-rwxr-xr-xmayor-installer.fcgi/install.d/60portal.sh119
1 files changed, 0 insertions, 119 deletions
diff --git a/mayor-installer.fcgi/install.d/60portal.sh b/mayor-installer.fcgi/install.d/60portal.sh
deleted file mode 100755
index e8ccfe90..00000000
--- a/mayor-installer.fcgi/install.d/60portal.sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/bash
-#
-
-cat <<EOF
-A MaYoR Portal modul telepítése
-
-A keretrendszer és az elektronikus napló modul mellett
-telepíthető a portál modul, ami egy egyszerű, testreszabható
-nyitóoldalt ad az egyes hozzáférési szintekhez. A személyes
-kezdőlapon megjeleníthető a napi órarend, a legutóbbi üzenetek,
-az aktuális kérelmek listája, név- és születésnap információk,
-illetve kiírhatunk híreket is.
-
-EOF
-
-read -n 1 -p "Telepítsem a portál modult? (i/N)" -s DO
-if [ "$DO" != "i" ]; then echo -e "\nA portál modult nem telepítem.\n"; exit 1; fi
-
-echo -e "\nA main.conf módosítása ..."
-if [ ! -e $MAYORDIR/config/main.conf ]; then
- echo -e "\nHiányzó konfigurációs állomány: $MAYORDIR/config/main.conf"
- exit 1;
-fi
-
-sed -r -i.60portal \
- -e "s#mayor-naplo#mayor-naplo mayor-portal#" $MAYORDIR/config/main.conf
-
-echo -e "\nA telepítőcsomag letöltése ..."
-
-cd $TMPDIR
-rm -f mayor-portal-current.tgz
-wget "http://www.mayor.hu/download/$VERSION/mayor-portal-current.tgz"
-
-echo -e -n "Források kicsomagolása... "
-cd $MAYORDIR
-tar xfz "$TMPDIR/mayor-portal-current.tgz"
-echo "ok."
-
-echo -e "\nA porál modul konfigurációs állományának létrehozása"
-file="module-portal/config.php"
-if [ -e "${MAYORDIR}/config/${file}" ]; then echo " $file létezik."; else
- echo -n " $file.example --> "
- PW=`pwgen -s1`
- 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 <<EOF
-
-Az egyes hozzáférési szintek konfigurációs állományaiban
-(private-conf.php, parent-conf.php, public-conf.php) állítható
-be, hogy mi legyen a kezdőlap a \$DEFAULT_PSF tömb módosításával.
-
-EOF
-
-else
- echo ""
- for file in private-conf.php parent-conf.php public-conf.php; do
- echo -n " $file ... "
- sed -i.60portal -e "s/^[ \t]*\$DEFAULT_PSF\[\(.*\)\]\(.*\)/\/\/\t\$DEFAULT_PSF\[\1\]\2\n\t\$DEFAULT_PSF\[\1\] = array('page'=>'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
-