diff options
author | 2005-01-07 08:55:42 +0000 | |
---|---|---|
committer | 2005-01-07 08:55:42 +0000 | |
commit | 2014725a2670275d716f282bde4eb9dd3518558c (patch) | |
tree | c8fce52449f0bc3d0cad2f19bdf4d950a6055e5a | |
parent | Horde build (diff) | |
download | misc-2014725a2670275d716f282bde4eb9dd3518558c.tar.gz misc-2014725a2670275d716f282bde4eb9dd3518558c.tar.bz2 misc-2014725a2670275d716f282bde4eb9dd3518558c.zip |
Scripts and nntprss
svn path=/z-distfiles/; revision=72
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/SVN-daily | 20 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/SVN-etc | 35 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/SVN-html | 57 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/SVN-ldap | 34 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/SVN-monthly | 20 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/SVN-mysql | 34 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/spam-report | 11 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/svn-add | 11 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw-1.1/svn-del | 11 | ||||
-rw-r--r-- | z-packages/horde-3.0-rc1.tar.bz2 | bin | 3652 -> 8684 bytes |
10 files changed, 90 insertions, 143 deletions
diff --git a/z-distfiles/scripts-gw-1.1/SVN-daily b/z-distfiles/scripts-gw-1.1/SVN-daily index e591552..4c73db9 100755 --- a/z-distfiles/scripts-gw-1.1/SVN-daily +++ b/z-distfiles/scripts-gw-1.1/SVN-daily @@ -1,15 +1,5 @@ #!/bin/bash -if [ "x$1" == "x--help" ]; then - echo "Usage: SVN-daily" - echo " or: SVN-daily encrypt@for.user" - echo - echo "Dumps the subversion repositories to /var/svn/dump" - echo "and encrypts the dump if a recipient is given. The dump" - echo "is incremental." - exit 0 -fi - BIN_DUMP="/usr/sbin/SVN-dump" for REPOSITORY in /var/svn/repos/* @@ -17,12 +7,10 @@ for REPOSITORY in /var/svn/repos/* $BIN_DUMP $REPOSITORY /var/svn/dump/`basename $REPOSITORY`.dump incremental done -if [ "x$1" != "x" ]; then - for FILE in /var/svn/dump/*.bz2 - do - [ -f $FILE ] && /usr/bin/gpg --default-recipient $1 --encrypt-files $FILE && rm $FILE - done -fi +for FILE in /var/svn/dump/*.bz2 + do + [ -f $FILE ] && /usr/bin/gpg --default-recipient post@gunnarwrobel.de --encrypt-files $FILE && rm $FILE +done chown -R apache:apache /var/svn/dump chmod 750 /var/svn/dump diff --git a/z-distfiles/scripts-gw-1.1/SVN-etc b/z-distfiles/scripts-gw-1.1/SVN-etc index c802770..3d53c7e 100755 --- a/z-distfiles/scripts-gw-1.1/SVN-etc +++ b/z-distfiles/scripts-gw-1.1/SVN-etc @@ -1,37 +1,26 @@ #!/bin/bash -if [ "x$1" == "x--help" ]; then - echo "Usage: SVN-etc /backup/dir \"commit message\"" - echo - echo "Copies the /etc directory into the given /backup/dir/etc" - echo "and subsequently performs a \"svn commit\". So the " - echo "backup dir has to be a checkout from an svn repository." - exit 0 -fi +LOGFILE=/root/.log/cronlog +ERRFILE=/root/.log/errlog +BASEDIR=/root/opt/backup/etc/ -LOGFILE=${1}/cronlog -ERRFILE=${1}/errlog -BASEDIR=${1}/etc/ +rm $LOGFILE +rm $ERRFILE -if [ ! -d "${BASEDIR}" ]; then - mkdir -p $BASEDIR - cd ${1} && svn add etc -fi +date >> $LOGFILE +date >> $ERRFILE -date > $LOGFILE -date > $ERRFILE +find /etc/ | grep "~$" >> $LOGFILE +find /etc/ | grep "~$" | xargs rm rsync -rptgo --delete-after --exclude ".svn/" /etc/ $BASEDIR 2>> $ERRFILE | grep -v "skipping" cd $BASEDIR && TL=`find .` && for fl in $TL;do [ -L $fl ] && rm $fl;done -cd $BASEDIR && svn status | grep '^!' | sed -e 's/^!//' | sed -e "s/^ *//" | sed -e 's/ /\\ /g' | xargs svn rm &> $LOGFILE -cd $BASEDIR && svn status | grep '^?' | sed -e 's/^?//' | sed -e "s/^ *//" | sed -e 's/ /\\ /g' | xargs svn add &> $LOGFILE +cd $BASEDIR && svn-del do &> $LOGFILE +cd $BASEDIR && svn-add do &> $LOGFILE -MESSAGE="$2" +MESSAGE="$1" [ ! "$MESSAGE" ] && MESSAGE="Automatic Update" cd $BASEDIR >> $LOGFILE 2>> $ERRFILE && svn commit -m "$MESSAGE" >> $LOGFILE 2>> $ERRFILE cat $LOGFILE cat $ERRFILE - -rm $LOGFILE -rm $ERRFILE diff --git a/z-distfiles/scripts-gw-1.1/SVN-html b/z-distfiles/scripts-gw-1.1/SVN-html index 95bf9f7..5db9df4 100755 --- a/z-distfiles/scripts-gw-1.1/SVN-html +++ b/z-distfiles/scripts-gw-1.1/SVN-html @@ -1,38 +1,37 @@ #!/bin/bash -if [ "x$1" == "x--help" ]; then - echo "Usage: SVN-html /backup/dir \"commit message\"" - echo - echo "Copies the /var/www directory into the given /backup/dir/html" - echo "and subsequently performs a \"svn commit\". So the " - echo "backup dir has to be a checkout from an svn repository." - exit 0 -fi - -LOGFILE=${1}/cronlog -ERRFILE=${1}/errlog -BASEDIR=${1}/html/ - -if [ ! -d "${BASEDIR}" ]; then - mkdir -p $BASEDIR - cd ${1} && svn add html -fi - -date > $LOGFILE -date > $ERRFILE - -rsync -rptgo --delete-after --exclude ".svn/" /var/www/ $BASEDIR 2>> $ERRFILE | grep -v "skipping" +LOGFILE=/root/.log/cronlog +ERRFILE=/root/.log/errlog +BASEDIR=/root/opt/backup/html/ +STBLDIR=/home/wrobel/opt/Stable/Www +USR=wrobel:users + +rm $LOGFILE +rm $ERRFILE + +date >> $LOGFILE +date >> $ERRFILE + +for dir in `cat /var/www/data-backup` + do + mkdir -p $STBLDIR/$dir + rsync -rptgo --delete-after --exclude ".svn/" $dir/ $STBLDIR/$dir/ 2>> $ERRFILE | grep -v "skipping" +done +chown -R $USR $STBLDIR + +for dir in `cat /var/www/conf-backup` + do + mkdir -p $BASEDIR/$dir + rsync -rptgo --delete-after --exclude ".svn/" $dir/ $BASEDIR/$dir/ 2>> $ERRFILE | grep -v "skipping" +done + cd $BASEDIR && TL=`find .` && for fl in $TL;do [ -L $fl ] && rm $fl;done -cd $BASEDIR && svn status | grep '^!' | sed -e 's/^!//' | sed -e "s/^ *//" | sed -e 's/ /\\ /g' | xargs svn rm &> $LOGFILE -cd $BASEDIR && svn status | grep '^?' | sed -e 's/^?//' | sed -e "s/^ *//" | sed -e 's/ /\\ /g' | xargs svn add &> $LOGFILE +cd $BASEDIR && svn-del do &> $LOGFILE +cd $BASEDIR && svn-add do &> $LOGFILE -MESSAGE="$2" +MESSAGE="$1" [ ! "$MESSAGE" ] && MESSAGE="Automatic Update" cd $BASEDIR >> $LOGFILE 2>> $ERRFILE && svn commit -m "$MESSAGE" >> $LOGFILE 2>> $ERRFILE cat $LOGFILE cat $ERRFILE - -rm $LOGFILE -rm $ERRFILE - diff --git a/z-distfiles/scripts-gw-1.1/SVN-ldap b/z-distfiles/scripts-gw-1.1/SVN-ldap index 7ee7681..b36e462 100755 --- a/z-distfiles/scripts-gw-1.1/SVN-ldap +++ b/z-distfiles/scripts-gw-1.1/SVN-ldap @@ -1,34 +1,20 @@ #!/bin/bash -if [ "x$1" == "x--help" ]; then - echo "Usage: SVN-ldap /backup/dir \"commit message\"" - echo - echo "Dumps all mysql databases into the given /backup/dir/ldap" - echo "and subsequently performs a \"svn commit\". So the " - echo "backup dir has to be a checkout from an svn repository." - exit 0 -fi +LOGFILE=/root/.log/cronlog +ERRFILE=/root/.log/errlog +BASEDIR=/root/opt/backup/ldap/ -LOGFILE=${1}/cronlog -ERRFILE=${1}/errlog -BASEDIR=${1}/ldap/ +/bin/rm $LOGFILE +/bin/rm $ERRFILE -if [ ! -d "${BASEDIR}" ]; then - mkdir -p $BASEDIR - cd ${1} && svn add ldap -fi +/bin/date >> $LOGFILE +/bin/date >> $ERRFILE -date > $LOGFILE -date > $ERRFILE +/usr/sbin/slapcat > $BASEDIR/ldap.dump -slapcat > $BASEDIR/ldap.dump - -MESSAGE="$2" +MESSAGE="$1" [ ! "$MESSAGE" ] && MESSAGE="Automatic Update" -cd $BASEDIR >> $LOGFILE 2>> $ERRFILE && svn commit -m "$MESSAGE" >> $LOGFILE 2>> $ERRFILE +cd $BASEDIR >> $LOGFILE 2>> $ERRFILE && /usr/bin/svn commit -m "$MESSAGE" >> $LOGFILE 2>> $ERRFILE cat $LOGFILE cat $ERRFILE - -rm $LOGFILE -rm $ERRFILE diff --git a/z-distfiles/scripts-gw-1.1/SVN-monthly b/z-distfiles/scripts-gw-1.1/SVN-monthly index 8c9cc86..e98b6e9 100755 --- a/z-distfiles/scripts-gw-1.1/SVN-monthly +++ b/z-distfiles/scripts-gw-1.1/SVN-monthly @@ -1,15 +1,5 @@ #!/bin/bash -if [ "x$1" == "x--help" ]; then - echo "Usage: SVN-monthly" - echo " or: SVN-monthly encrypt@for.user" - echo - echo "Dumps the subversion repositories to /var/svn/dump" - echo "and encrypts the dump if a recipient is given. The dump" - echo "is a complete dump." - exit 0 -fi - BIN_DUMP="/usr/sbin/SVN-dump" for REPOSITORY in /var/svn/repos/* @@ -17,12 +7,10 @@ for REPOSITORY in /var/svn/repos/* $BIN_DUMP $REPOSITORY /var/svn/dump/`basename $REPOSITORY`.dump full done -if [ "x$1" != "x" ]; then - for FILE in /var/svn/dump/*.bz2 - do - [ -f $FILE ] && /usr/bin/gpg --default-recipient $1 --encrypt-files $FILE && rm $FILE - done -fi +for FILE in /var/svn/dump/*.bz2 + do + [ -f $FILE ] && /usr/bin/gpg --default-recipient post@gunnarwrobel.de --encrypt-files $FILE && rm $FILE +done chown -R apache:apache /var/svn/dump chmod 750 /var/svn/dump diff --git a/z-distfiles/scripts-gw-1.1/SVN-mysql b/z-distfiles/scripts-gw-1.1/SVN-mysql index 5c0d6c2..cf20b22 100755 --- a/z-distfiles/scripts-gw-1.1/SVN-mysql +++ b/z-distfiles/scripts-gw-1.1/SVN-mysql @@ -1,34 +1,20 @@ #!/bin/bash -if [ "x$1" == "x--help" ]; then - echo "Usage: SVN-mysql /backup/dir mysql-root-pass \"commit message\"" - echo - echo "Dumps all mysql databases into the given /backup/dir/mysql" - echo "and subsequently performs a \"svn commit\". So the " - echo "backup dir has to be a checkout from an svn repository." - exit 0 -fi +LOGFILE=/root/.log/cronlog +ERRFILE=/root/.log/errlog +BASEDIR=/root/opt/backup/mysql/ -LOGFILE=${1}/cronlog -ERRFILE=${1}/errlog -BASEDIR=${1}/mysql/ +/bin/rm $LOGFILE +/bin/rm $ERRFILE -if [ ! -d "${BASEDIR}" ]; then - mkdir -p $BASEDIR - cd ${1} && svn add mysql -fi +/bin/date >> $LOGFILE +/bin/date >> $ERRFILE -date > $LOGFILE -date > $ERRFILE +/usr/bin/mysqldump -u root -p4H6e4p6p --all-databases > $BASEDIR/mysql.dump -mysql-dump-all ${2} $BASEDIR - -MESSAGE="$3" +MESSAGE="$1" [ ! "$MESSAGE" ] && MESSAGE="Automatic Update" -cd $BASEDIR >> $LOGFILE 2>> $ERRFILE && svn commit -m "$MESSAGE" >> $LOGFILE 2>> $ERRFILE +cd $BASEDIR >> $LOGFILE 2>> $ERRFILE && /usr/bin/svn commit -m "$MESSAGE" >> $LOGFILE 2>> $ERRFILE cat $LOGFILE cat $ERRFILE - -rm $LOGFILE -rm $ERRFILE diff --git a/z-distfiles/scripts-gw-1.1/spam-report b/z-distfiles/scripts-gw-1.1/spam-report index fe67e05..68a3f0e 100755 --- a/z-distfiles/scripts-gw-1.1/spam-report +++ b/z-distfiles/scripts-gw-1.1/spam-report @@ -1,11 +1,9 @@ #!/bin/bash -if [ -d "${1}" ] - then +if [ -d "${1}" ]; then MAILS="`ls ${1}`" - if [ ! -z "${MAILS}" ] - then - for MAIL in "${MAILS}" + if [ ! -z "${MAILS}" ]; then + for MAIL in ${MAILS} do echo "Report ${1}/${MAIL}" spamassassin -r < "${1}/${MAIL}" @@ -13,8 +11,7 @@ if [ -d "${1}" ] rm "${1}/${MAIL}" done fi - if [ -z "${MAILS}" ] - then + if [ -z "${MAILS}" ]; then echo "Nothing in ${1} to report!" fi fi diff --git a/z-distfiles/scripts-gw-1.1/svn-add b/z-distfiles/scripts-gw-1.1/svn-add index 0368725..09bc0f7 100755 --- a/z-distfiles/scripts-gw-1.1/svn-add +++ b/z-distfiles/scripts-gw-1.1/svn-add @@ -1,7 +1,14 @@ #/bin/bash -svn status | grep '^?' | sed -e 's/^?//' +FILES=`svn status | sed -e '/^[^?]/d + s/^?// + s/^ *// + s/ /\\ /'` + +echo ${FILES} if [ "${1}" = "do" ]; then - svn status | grep '^?' | sed -e 's/^?//' | xargs svn add + if [ "x${FILES}" != "x" ]; then + svn add "${FILES}" + fi fi diff --git a/z-distfiles/scripts-gw-1.1/svn-del b/z-distfiles/scripts-gw-1.1/svn-del index 812d99a..9998c0a 100755 --- a/z-distfiles/scripts-gw-1.1/svn-del +++ b/z-distfiles/scripts-gw-1.1/svn-del @@ -1,7 +1,14 @@ #/bin/bash -svn status | grep '^!' | sed -e 's/^!//' +FILES=`svn status | sed -e '/^[^!]/d + s/^!// + s/^ *// + s/ /\\ /'` + +echo ${FILES} if [ "${1}" = "do" ]; then - svn status | grep '^!' | sed -e 's/^!//' | xargs svn del + if [ "x${FILES}" != "x" ]; then + svn del "${FILES}" + fi fi diff --git a/z-packages/horde-3.0-rc1.tar.bz2 b/z-packages/horde-3.0-rc1.tar.bz2 Binary files differindex d8b43b7..0f8e26b 100644 --- a/z-packages/horde-3.0-rc1.tar.bz2 +++ b/z-packages/horde-3.0-rc1.tar.bz2 |