diff options
author | M.Gergo | 2019-03-08 20:50:48 +0100 |
---|---|---|
committer | M.Gergo | 2019-03-08 20:50:48 +0100 |
commit | 3dab26c6797b32926287f22a041380080551060b (patch) | |
tree | bb4ba41398083a054e956e25f2d8c72bcdd0a7a0 /mayor-mod/bin/sbin | |
parent | f70027ffbedce10f412868a7bf9b0b67b113f1b1 (diff) | |
download | mayor-3dab26c6797b32926287f22a041380080551060b.tar.gz mayor-3dab26c6797b32926287f22a041380080551060b.zip |
pici rendrakás
Diffstat (limited to 'mayor-mod/bin/sbin')
-rwxr-xr-x | mayor-mod/bin/sbin/eNaploBackup.sh | 95 | ||||
-rwxr-xr-x | mayor-mod/bin/sbin/eNaploRestore.sh | 82 | ||||
-rw-r--r-- | mayor-mod/bin/sbin/update.sh | 33 |
3 files changed, 0 insertions, 210 deletions
diff --git a/mayor-mod/bin/sbin/eNaploBackup.sh b/mayor-mod/bin/sbin/eNaploBackup.sh deleted file mode 100755 index 5bdba177..00000000 --- a/mayor-mod/bin/sbin/eNaploBackup.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -## -# Az elektronikus mentése (Version 1.0) -## - - DATE=`date +%Y%m%d` - NAPLO_BACKUP_BASE_DIR='/backup/naplo' - NAPLO_BACKUP_DIR="$NAPLO_BACKUP_BASE_DIR/$DATE" - - DATABASES='mayor_parent mayor_private mayor_naplo intezmeny_fasori naplo_fasori_2007' - #MYSQL_DB='%MYSQL_NAPLO_DB%' - MYSQL_USER='%MYSQL_NAPLO_USER%' - MYSQL_PW='%MYSQL_NAPLO_PW%' - - WWW_SSL_DIR='%BASEDIR%' - WEB_SERVER_USER='%WEB_SERVER_USER%' - EXPIRE_DATE=`date -d '30 days ago' +%Y%m%d` - - BASEDN='%BASEDN%' - LDAP_CONF_DIR='%LDAP_CONF_DIR%' - LDAP_DB_DIR='%LDAP_DB_DIR%' - -## -# A könyvtárak létrehozása -## - if [ ! -e $NAPLO_BACKUP_BASE_DIR ]; then - /bin/mkdir $NAPLO_BACKUP_BASE_DIR - fi - /bin/chown $WEB_SERVER_USER $NAPLO_BACKUP_BASE_DIR - /bin/chmod 700 $NAPLO_BACKUP_BASE_DIR - - if [ -e $NAPLO_BACKUP_DIR.tgz ]; then - exit 1 - fi - /bin/mkdir $NAPLO_BACKUP_DIR - /bin/chown $WEB_SERVER_USER $NAPLO_BACKUP_DIR - /bin/chmod 700 $NAPLO_BACKUP_DIR - -## -# mysql adatbázis mentése -## - -for DATABASE in $DATABASES; do - /usr/bin/mysqldump -p$MYSQL_PW -u$MYSQL_USER $DATABASE >> $NAPLO_BACKUP_DIR/$DATABASE.sql -done - -## -# mysql adatbázis mentése -## - -# /usr/bin/mysqldump -p$MYSQL_PW -u$MYSQL_USER $MYSQL_DB >> $NAPLO_BACKUP_DIR/$MYSQL_DB.sql - -## -# A honlap mentése -## - - mkdir $NAPLO_BACKUP_DIR/html - - /bin/cp -a $WWW_SSL_DIR/* $NAPLO_BACKUP_DIR/html/ - -## -# Az LDAP adatbázis -## - - /etc/init.d/slapd stop - /bin/sleep 1 - - /usr/sbin/slapcat -b $BASEDN -l $NAPLO_BACKUP_DIR/ldap.ldif - - /bin/cp -a $LDAP_DB_DIR $NAPLO_BACKUP_DIR/ldap - - /etc/init.d/slapd start - -## -# LDAP konfig file-ok mentése (schema) -## - - /bin/mkdir $NAPLO_BACKUP_DIR/etc - /bin/cp -a $LDAP_CONF_DIR $NAPLO_BACKUP_DIR/etc/ - -## -# Becsomagolás -## - - cd $NAPLO_BACKUP_BASE_DIR - /bin/tar cfz $DATE.tgz $DATE - /bin/rm -rf $NAPLO_BACKUP_DIR - -## -# Elavult mentés tölése -## - - if [ -e $NAPLO_BACKUP_BASE_DIR/$EXPIRE_DATE.tgz ]; then - rm -rf $NAPLO_BACKUP_BASE_DIR/$EXPIRE_DATE.tgz - fi diff --git a/mayor-mod/bin/sbin/eNaploRestore.sh b/mayor-mod/bin/sbin/eNaploRestore.sh deleted file mode 100755 index f383360f..00000000 --- a/mayor-mod/bin/sbin/eNaploRestore.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -## -# Az elektronikus visszatöltése (Version 1.0) -## - - NAPLO_BACKUP_BASE_DIR='/backup/naplo' - NAPLO_BACKUP_TMP_DIR="$NAPLO_BACKUP_BASE_DIR/tmp" - - DATABASE='%MYSQL_NAPLO_DB%' - MYSQL_PW='%MYSQL_ROOT_PW%' - MYSQL_USER='root' - - WWW_DIR='%BASEDIR%' - WEB_SERVER_USER='%WEB_SERVER_USER%' - BASEDN='%BASEDN%' - DUMP_FILE="$DATABASE.sql" - LDIF_FILE='ldap.ldif' - LDAP_DB_DIR='%LDAP_DB_DIR%/mayor' - -## -# A paraméter ellenőrzése -## - - if [ -z $1 ]; then - exit 1 - else - if [ -e $NAPLO_BACKUP_BASE_DIR/$1 ]; then - FILE=$1 - DATE=`echo $FILE | cut -d . -f 1` - else - exit 2 - fi - fi - -echo "PARAMÉTER: $1" - -## -# TMP Könyvtár ellenőrzése, létrehozása -## - - if [ ! -e $NAPLO_BACKUP_TMP_DIR ]; then - /bin/mkdir $NAPLO_BACKUP_TMP_DIR - fi - /bin/chown $WEB_SERVER_USER $NAPLO_BACKUP_TMP_DIR - /bin/chmod 700 $NAPLO_BACKUP_TMP_DIR - -## -# Adatfile kicsomagolása -## - - cd $NAPLO_BACKUP_TMP_DIR - /bin/tar xfz $NAPLO_BACKUP_BASE_DIR/$FILE - if [ ! -e $NAPLO_BACKUP_TMP_DIR/$DATE/$DUMP_FILE ]; then - exit 3 - fi - if [ ! -e $NAPLO_BACKUP_TMP_DIR/$DATE/$LDIF_FILE ]; then - exit 4 - fi - -## -# Az LDAP adatbázis visszatöltése/felülírása -## - - /etc/init.d/slapd stop - /bin/sleep 1 - - /bin/rm -rf $LDAP_DB_DIR/* - /usr/sbin/slapadd -c -b $BASEDN -l $NAPLO_BACKUP_TMP_DIR/$DATE/$LDIF_FILE - - /etc/init.d/slapd start - -## -# mysql adatbázis visszatöltése -## - -(cat <<EOF -DROP DATABASE IF EXISTS $DATABASE; -CREATE DATABASE $DATABASE; -EOF -) | mysql -u$MYSQL_USER -p$MYSQL_PW - -cat $NAPLO_BACKUP_TMP_DIR/$DATE/$DUMP_FILE | mysql -u$MYSQL_USER -p$MYSQL_PW $DATABASE diff --git a/mayor-mod/bin/sbin/update.sh b/mayor-mod/bin/sbin/update.sh deleted file mode 100644 index 53735e6d..00000000 --- a/mayor-mod/bin/sbin/update.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -DIR=/var/mayor -REV="$DIR/www/include/config/rev.php" -PARENT="haladasi/haladasi haladasi/stat osztalyozo/diak osztalyozo/jegy osztalyozo/dolgozat bejegyzesek/bejegyzesek tanev/fogadoOra tanev/helyettesites tanev/munkaterv tanev/orarend intezmeny/valtas hianyzas/diak hianyzas/nap hianyzas/info uzeno/uzeno ertekeles/ertekeles hirnok/hirnok hirnok/hirnokFeliratkozas" -PUBLIC="tanev/orarend tanev/szabadTerem tanev/helyettesites" -WRITABLE="download/private/export download/private/osztalyozo download/private/nyomtatas/osztalyozo download/private/nyomtatas/haladasi" - -svn --force export https://blyck.vmg.sulinet.hu/svn/trunk/mayor-base/www /var/mayor/www/ -# svn --force export https://blyck.vmg.sulinet.hu/svn/trunk/mayor-keptar/www /var/mayor/www/ -# svn --force export https://blyck.vmg.sulinet.hu/svn/trunk/mayor-honosito/www /var/mayor/www/ -# svn --force export https://blyck.vmg.sulinet.hu/svn/trunk/mayor-portal/www /var/mayor/www/ -svn --force export https://blyck.vmg.sulinet.hu/svn/trunk/mayor-naplo/install/module-naplo/mysql /var/mayor/install/module-naplo/mysql -svn --force export http://blyck.vmg.sulinet.hu/svn/trunk/mayor-base/print /var/mayor/print -svn --force export http://blyck.vmg.sulinet.hu/svn/trunk/mayor-naplo/print /var/mayor/print -svn --force export http://blyck.vmg.sulinet.hu/svn/trunk/mayor-naplo/print /var/mayor/download -chown -R www-data.www-data /var/mayor/download -svn --force export http://blyck.vmg.sulinet.hu/svn/trunk/mayor-base/data/base /var/mayor/data/base -svn --force export https://blyck.vmg.sulinet.hu/svn/trunk/mayor-naplo/www /var/mayor/www/ | grep revision | cut -d ' ' -f 3 | uniq > $REV - -for f in $PARENT; do - ln -s $DIR/www/policy/private/naplo/$f-pre.php $DIR/www/policy/parent/naplo/$f-pre.php - ln -s $DIR/www/policy/private/naplo/$f.php $DIR/www/policy/parent/naplo/$f.php -done - -for f in $PUBLIC; do - ln -s $DIR/www/policy/private/naplo/$f-pre.php $DIR/www/policy/public/naplo/$f-pre.php - ln -s $DIR/www/policy/private/naplo/$f.php $DIR/www/policy/public/naplo/$f.php -done - -for f in $WRITABLE; do - chmod a+rwx $DIR/$f -done |