From 1813cd279dce359110af4b73161e5a5fb94059dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20K=C3=B6gl?= Date: Sun, 26 Oct 2014 11:33:37 +0100 Subject: [PATCH] [Migration] remove unused CouchDB related scripts --- bin/compact-db.sh | 6 ----- bin/compact-view.sh | 8 ------ bin/couchdb-view-usage.sh | 16 ------------ bin/perform-update.sh | 65 ----------------------------------------------- bin/view-usage.sh | 8 ------ 5 files changed, 103 deletions(-) delete mode 100755 bin/compact-db.sh delete mode 100755 bin/compact-view.sh delete mode 100755 bin/couchdb-view-usage.sh delete mode 100755 bin/perform-update.sh delete mode 100755 bin/view-usage.sh diff --git a/bin/compact-db.sh b/bin/compact-db.sh deleted file mode 100755 index 81968a8f..00000000 --- a/bin/compact-db.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -COUCHDB=`mygpo/print-couchdb.py` - -curl -s -H "Content-Type: application/json" -X POST $COUCHDB/_compact > /dev/null - diff --git a/bin/compact-view.sh b/bin/compact-view.sh deleted file mode 100755 index 478f1634..00000000 --- a/bin/compact-view.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -VIEW=$1 -COUCHDB=`mygpo/print-couchdb.py` - -curl -s -H "Content-Type: application/json" -X POST $COUCHDB/_compact/$VIEW > /dev/null - - diff --git a/bin/couchdb-view-usage.sh b/bin/couchdb-view-usage.sh deleted file mode 100755 index 350ada69..00000000 --- a/bin/couchdb-view-usage.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -DIR=`dirname $0` -cd $DIR/../couchdb/_design -DIRS=`find . -type d -wholename "*/views/*"` - -cd ../.. -for view in $DIRS; do - view_name=`echo $view | awk '{split($0,array,"/")} END{print array[2]"/"array[4]}'` - count=`git grep "'$view_name'" | wc -l` - if [ $count = "0" ]; then - echo -e -n "\e[00;31m" - fi - echo $view_name $count | awk '{ printf "%-40s%-5s\n",$1,$2}' - echo -e -n '\e[00m' -done diff --git a/bin/perform-update.sh b/bin/perform-update.sh deleted file mode 100755 index 8347aa23..00000000 --- a/bin/perform-update.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -# upgrade gpodder.net from public repository -# Stefan Kögl; 2011-02-10 - - -BASEDIR=`dirname $0` -cd $BASEDIR/.. - -COUCHDB=`mygpo/print-couchdb.py` -MAINTENANCE_FILE=mygpo/MAINTENANCE_MODE - - -cat << EOF - - =================================== - gpodder.net Upgrade - =================================== - -You are about to perform an upgrade of your gpodder.net installation. -Press ENTER to continue or Ctrl+C to abort... -EOF - -read ME - - -echo -n " * Restart Webserver in Maintenace Mode... " -touch $MAINTENANCE_FILE -sudo /etc/init.d/lighttpd restart > /dev/null -echo done - -echo -n "* Stashing non-committed changes... " -git stash > /dev/null -echo done - -echo " * Retrieving changes from public repository... " -git pull > /dev/null -echo done - -echo " * Popping stashed changes... " -git stash pop > /dev/null -echo done - -echo " * Syncing Database... " -cd mygpo -./manage.py syncdb > /dev/null -cd .. -echo done - -echo " * Wait for View-Updates to finish... " -bin/touch-views.sh > /dev/null -echo done - - -cat << EOF - -Finished update procedure! - -Please resolve conflicts if any -You can then start the webserver again by typing - - sudo /etc/init.d/lighttpd start - -EOF -rm $MAINTENANCE_FILE - diff --git a/bin/view-usage.sh b/bin/view-usage.sh deleted file mode 100755 index 60b609cd..00000000 --- a/bin/view-usage.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# When run on a CouchDB log file, determines the number of -# requests to individual views -# Usage: ./view-usage.sh /var/log/couchdb/couch.log - -LOGFILE=$1 - -cat $LOGFILE | grep GET | awk '{print $13;}' | cut -f1 -d"?" | awk '{count[$1]++}END{for(j in count) print count[j],j}' | sort -n -r | head -n 10 -- 2.11.4.GIT